Re: [Rails] Re: can't run webrick server

2012-03-13 Thread Satvat Rani
thanks Gijaldon.. Now my webrick server started. On Tue, Mar 13, 2012 at 7:06 PM, Gjaldon wrote: > I'm new too. Anyway, how 'bout trying 'bundle exec rails s'. > > On Mar 12, 7:54 pm, satvat rani wrote: > > The environment that i am working on is Windows xp and the > > configurations are,

Re: [Rails] inheriter_resource gem is now deprecated.

2012-03-13 Thread Bruno Coelho
On Tue, Mar 13, 2012 at 5:50 AM, Mauro wrote: > Someone use or had used inherited_resource gem? > I find it very userful to not repeat code in simple crud applications. > The maintainer said that the gem is no longer maintained. > Using helpers like resource or collection, or collection_url, etc.

Re: [Rails] 110.years.ago.to_datetime returns wrong date

2012-03-13 Thread Fernando Almeida
110.years.ago.to_datetime.in_time_zone(-3) => Thu, 13 Mar 1902 22:29:48 LMT -03:06 2012/3/13 Fernando Almeida > What is your timezone? for timezone 0 is 14 =) > > > 2012/3/13 John Merlino > >> >> I run this in console: >> >> >> 110.years.ago.to_datetime >> => Fri, 14 Mar 1902 01:20:12 + >

Re: [Rails] 110.years.ago.to_datetime returns wrong date

2012-03-13 Thread Fernando Almeida
What is your timezone? for timezone 0 is 14 =) 2012/3/13 John Merlino > > I run this in console: > > >> 110.years.ago.to_datetime > => Fri, 14 Mar 1902 01:20:12 + > > Today is the 13th of march. So why is it returning 14th? > > -- > You received this message because you are subscribed to the

[Rails] 110.years.ago.to_datetime returns wrong date

2012-03-13 Thread John Merlino
I run this in console: >> 110.years.ago.to_datetime => Fri, 14 Mar 1902 01:20:12 + Today is the 13th of march. So why is it returning 14th? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyon

[Rails] send_data always sends xml file?

2012-03-13 Thread Jeff Pritchard
I'm trying to use send_data to send a simple text file. Every reference I can find says I can supply a MIME type with the ":type" option and that will determine the kind of file I get on the machine that downloads the file I'm sending. Instead I ALWAYS get an XML file. here's the code snippet:

Re: [Rails] Re: NoMethodError

2012-03-13 Thread Colin Law
On 13 March 2012 21:55, AndyLikesRuby wrote: > Hi Colin, > > Thanks for the reply.  Your question prompted me to search around my > class declarations, and sure enough, I found the problem. > > I declared two container classes, Captionfile and Run, to capture > information in a convenient, encapsu

[Rails] Re: NoMethodError

2012-03-13 Thread AndyLikesRuby
Hi Colin, Thanks for the reply. Your question prompted me to search around my class declarations, and sure enough, I found the problem. I declared two container classes, Captionfile and Run, to capture information in a convenient, encapsulated format. From there I create objects to make arrays/

[Rails] asset pipeline questions

2012-03-13 Thread Josh
1) Why does an image that is known to have not changed ( a visa logo ) have 3 different versions on one server, and 4 different versions on another. These two servers are in different environments: ls -la public/a/visa-* -rw-r--r-- 1 rails rails 1506 2012-03-04 06:33 public/a/visa-2c267b881e96

[Rails] Re: rails check_box_tag

2012-03-13 Thread dasibre
Thank you very much for your help. On Mar 13, 1:38 pm, Walter Lee Davis wrote: > On Mar 13, 2012, at 12:54 PM, dasibre wrote: > > > Thanks for the quick response Walter. > > Rating is a text field. > > "SERIALIZE" don't have it in my model, don't know what it is...will > > look it up. > > > As yo

Re: [Rails] Re: NoMethodError

2012-03-13 Thread Colin Law
On 13 March 2012 17:36, AndyLikesRuby wrote: > Hi Colin, > > I did try restarting the server, etc.  I still can't fix the problem. You did not say whether you can do anything useful with the class at all (probably because you top posted rather than inserting comments inline). This would have to

Re: [Rails] Re: rails check_box_tag

2012-03-13 Thread Walter Lee Davis
On Mar 13, 2012, at 12:54 PM, dasibre wrote: > Thanks for the quick response Walter. > Rating is a text field. > "SERIALIZE" don't have it in my model, don't know what it is...will > look it up. > > As you can tell by the method name "checkBoxTest" I'm testing the > feature one check box at a ti

[Rails] Re: NoMethodError

2012-03-13 Thread AndyLikesRuby
Hi Colin, I did try restarting the server, etc. I still can't fix the problem. I am going to do some deep-diving into the code today. I suspect it has something to do with a file like routes.db, or similar. The code seems to be ok -- there's something else that isn't quite evident that's causi

[Rails] Re: NoMethodError

2012-03-13 Thread AndyLikesRuby
Hi Michael -- I am using Ruby v1.9.2p290, Rails v3.2.2, and rvm 1.8.5. I checked to see if I had duplicate files, but to no avail. I will do some deep digging this morning. If I find a solution, I'll post it. Thanks for your help. Andy On Mar 12, 12:17 am, Michael Pavling wrote: > On 9 March

[Rails] Re: rails check_box_tag

2012-03-13 Thread dasibre
Thanks for the quick response Walter. Rating is a text field. "SERIALIZE" don't have it in my model, don't know what it is...will look it up. As you can tell by the method name "checkBoxTest" I'm testing the feature one check box at a time, but you make a good point about using LIKE, IN to compare

[Rails] Re: Multiple search form error

2012-03-13 Thread Christopher Jones
All fixed now Colin, worked out the problem. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this grou

Re: [Rails] rails check_box_tag

2012-03-13 Thread Walter Lee Davis
On Mar 13, 2012, at 12:21 PM, dasibre wrote: > rails newbie need help with form. > I have a movie application. In the index I list all the movies and in > addition i have ratings check boxes for (R, PG, PG-13, G) > basically when you check a box and submit, the page should refresh > with movies w

[Rails] rails check_box_tag

2012-03-13 Thread dasibre
rails newbie need help with form. I have a movie application. In the index I list all the movies and in addition i have ratings check boxes for (R, PG, PG-13, G) basically when you check a box and submit, the page should refresh with movies with the chosen rating. So if you check R,PG; only movies

[Rails] Re: [Arel]Building query, but can't get a proper output

2012-03-13 Thread Jeroen van Ingen
Right... stupid me... Thanks anyway ;) -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, se

[Rails] Re: [Arel]Building query, but can't get a proper output

2012-03-13 Thread Juan Pablo Avello
El martes 13 de marzo de 2012 15:10:40 UTC+1, Ruby-Forum.com User escribió: > > I have the following code: > > advertisements_arel = Advertisement.order("advertisements.id > DESC").arel > @advertisements = (params[:website_id].present? ? > advertisements_arel.where(:website_id => params

[Rails] Re: Multiple search form error

2012-03-13 Thread Christopher Jones
Hi Colin, I have made some progression. I have no changed the code a bit and the consearch works but none of the others do despite having the same code? My model is the same but my controller has changed to the following: @games = Game.gamsearch(params[:gamsearch]) @games = Game.gensearch(

[Rails] [Arel]Building query, but can't get a proper output

2012-03-13 Thread Jeroen van Ingen
I have the following code: advertisements_arel = Advertisement.order("advertisements.id DESC").arel @advertisements = (params[:website_id].present? ? advertisements_arel.where(:website_id => params[:website_id]) : advertisements_arel).to_a It returns a struct Arel::SelectManager::Row

[Rails] Re: Re: Multiple search form error

2012-03-13 Thread Christopher Jones
It is doing the correct action but doing it for all the text fields. If for instance I type good in to the second search field (search for genre) it will do so, but it will also produce the text in the other two search fields and search for good in genre and console and then only produce a resu

Re: [Rails] Re: Multiple search form error

2012-03-13 Thread Colin Law
On 13 March 2012 13:52, Christopher Jones wrote: > Hey Colin, > > By using my log and typing in each of the fields the same search I get > the same results back in the log which is as followed: > > Started GET "/games?utf8=%E2%9C%93&search=good&commit=Search" for > 127.0.0.1 at 2012-03-13 13:48:14

[Rails] Re: Multiple search form error

2012-03-13 Thread Christopher Jones
Hey Colin, By using my log and typing in each of the fields the same search I get the same results back in the log which is as followed: Started GET "/games?utf8=%E2%9C%93&search=good&commit=Search" for 127.0.0.1 at 2012-03-13 13:48:14 + Processing by GamesController#index as HTML Param

Re: [Rails] link_to with :remote=>true works when bound to "click" but not "ajax:beforeSend"

2012-03-13 Thread Paul
$('approve-item').bind('ajax:before', function( etc... On Tue, Mar 6, 2012 at 10:59 PM, KevinC wrote: > Hi. I am trying to do an ajax link in Rails 3.2.1 and jQuery. I am > loading jquery.js and jquery_ujs.js.  In my document ready, if I bind > to the event "click," clicking the link fires an eve

[Rails] equivalent of "redirect_to :back" in json response

2012-03-13 Thread Paul
Hi, I've got an ajax call who's response does some complicated things on the view. I've already created this view in ruby on the server, so I'd rather not rewrite the entire thing in javascript when the ajax call returns. It seems like it should be easy enough to resend the current view (minus th

[Rails] Re: can't run webrick server

2012-03-13 Thread Gjaldon
I'm new too. Anyway, how 'bout trying 'bundle exec rails s'. On Mar 12, 7:54 pm, satvat rani wrote: > The environment that i am working on is Windows xp and the > configurations are, > > Ruby 1.8.7 [i386-mingw32] > Rails 2.3.5 > Gem 1.8.17 > > run -->ruby script/server > > these errors are occur:

Re: [Rails] Multiple search form error

2012-03-13 Thread Colin Law
On 13 March 2012 12:54, Christopher Jones wrote: > I currently have these 3 search methods in my rails model, they are all > the same apart from which field they search (take a look at the 5th line > inside each method). > > def self.search(*args) >  return [] if args.blank? >  cond_text, cond_val

[Rails] Multiple search form error

2012-03-13 Thread Christopher Jones
I currently have these 3 search methods in my rails model, they are all the same apart from which field they search (take a look at the 5th line inside each method). def self.search(*args) return [] if args.blank? cond_text, cond_values = [], [] args.each do |str| next if str.blank? cond

[Rails] using Barby in rails

2012-03-13 Thread Marcin S
Hello im trying to add some barcode generation funcionality to my app, all via barby gem. I'm building a custom helper, but i cant include barby module to load, when i write module BarcodeHelper include Barby end i receive error: Routing Error uninitialized constant BarcodeHelper::Barby Try ru

[Rails] Re: Encoding Issues Seeds.rb

2012-03-13 Thread Maxus
Hi All, I tried everything and was going mad. I discovered redownloading the file and replacing my existing one fixed it after putting the utf header in. My guess is editing the file on windows somehow stuffed up the encoding (surprise surprise!). Thank you everyone for their help! -M On Monda

[Rails] inheriter_resource gem is now deprecated.

2012-03-13 Thread Mauro
Someone use or had used inherited_resource gem? I find it very userful to not repeat code in simple crud applications. The maintainer said that the gem is no longer maintained. Using helpers like resource or collection, or collection_url, etc. saved me to duplicate code. What solution do you adopt

[Rails] Re: Main page have two html parts rails3

2012-03-13 Thread amvis
Just i check the application.html.erb from app/layouts. so just i see the file like this ** ** ** * BizMofobi* * <%= stylesheet_link_tag"application" %>* * <%= javascript_include_tag "application" %>* * <%= csrf_meta_tags %>* ** ** * * *<%= yield %>* * * ** ** But now just i remove all t

[Rails] Re: dhtmlx grid excel using ror 3

2012-03-13 Thread motoko motoko
I'm interested in this too. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to