Re: [Rails] Re: Hello World works on Mongrel but not in Passenger (Error 500), and nothing in the logs?
On 15 August 2012 02:25, Leon V. li...@ruby-forum.com wrote: Just have to say thank you for this post. I have Ubuntu 12.04 LTS and have been trying to learn ruby on rails and this has been something I am stuck on now for 2 days. :) RAILS_ENV helped, but did not solve it for me yet. It is no good replying to a three year old thread saying that you have the problem too. Start a new thread and describe the problem you are seeing. Colin -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Using Jquery plugin tokenInput with rails
On 13 August 2012 11:33, Colin Law clan...@googlemail.com wrote: On 13 August 2012 10:52, sumit srivastava sumit.theinvinci...@gmail.com wrote: ... I verified the html for the view. No error related to the form was found. What else could be the problem? Make sure there are no errors at all, if there are any errors anywhere on the page you cannot be sure that anything will work, as the browser is having to guess what you meant and sometimes it gets it wrong. It is the most basic rule of debugging, first fix all the problems that are clearly identified. You cannot imagine the amount of time that is wasted trying to track down a tricky bug, whilst saying that simple error that I know about cannot possibly cause this other problem in an entirely different bit of code which in the end turns out to be a side effect of the first problem. So fix all the html validation problems first. It may not fix the submit problem but you have to do it sometime after all, so do it now. The next time you find a website that is behaving strangely or does not look right then paste the url into the validator (I expect you saw that you can give it a url rather than paste in the code) and it is very likely there are errors. The site may well have been tested in one browser and the errors did not appear to matter. Using another browser, or even a update to the browser, can change the way it interprets invalid html and the page breaks. Hi Sumit. Have you solved this problem? Colin -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Growl_notify like similar gems for Linux
Hello, As far as I know *growl_notify* gems only work in *MAC OSX*. is there any similar gems available for Linux?? Thanks -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/eZaAIioxHjoJ. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Growl_notify like similar gems for Linux
Hi you can use this : https://github.com/guard/guard/#libnotify for linux ;-) Best 2012/8/15 Adnan adnan.a...@gmail.com Hello, As far as I know *growl_notify* gems only work in *MAC OSX*. is there any similar gems available for Linux?? Thanks -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/eZaAIioxHjoJ. For more options, visit https://groups.google.com/groups/opt_out. -- *lionel Bastian LONKAP TSAMBA* Étudiant 4e année Génie Informatique et Statistiques à Polytech-lille Site: http://first-developer.fr Email: lionel.firstdevelo...@gmail.com Tel: +336 12 48 03 01 -- *lionel Bastian LONKAP TSAMBA* Fourth year student in Software Engineering and Statistics at the Lille University Graduate School of Engineers (Polytech-Lille) Site: http://first-developer.fr Email: lionel.firstdevelo...@gmail.com Phone: +336 12 48 03 01 -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Growl_notify like similar gems for Linux
https://github.com/splattael/libnotify 2012/8/15 Adnan adnan.a...@gmail.com Hello, As far as I know *growl_notify* gems only work in *MAC OSX*. is there any similar gems available for Linux?? Thanks -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/eZaAIioxHjoJ. For more options, visit https://groups.google.com/groups/opt_out. -- Fernando Almeida www.fernandoalmeida.net -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] How to enable activerecord whitelist_attributes in non-Rails environment?
Hello all, I'm developing a sinatra application and loads ActiveRecord in, sometimes it will just report warning for mass for attributes, how can I enable it in non-Rails environment? checked in rails code, it's config.active_record.whitelist_attributes = true, so I add to my top code of sinatra ActiveRecord::Base.whitelist_attributes=true but no luck, no such method exists in ActiveRecord::Base, so what's the class of config.active_record, and when setting whitelist_attributes = true, in what point it invokes some method of active_record to make it whitelist_attributes aware? Thanks. Best Regards -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Growl_notify like similar gems for Linux
On Wed, Aug 15, 2012 at 4:25 AM, Fernando Almeida ferna...@fernandoalmeida.net wrote: https://github.com/splattael/libnotify 2012/8/15 Adnan adnan.a...@gmail.com Hello, As far as I know *growl_notify* gems only work in *MAC OSX*. is there any similar gems available for Linux?? I don't know what the difference is between iNotify and libnotify, but I use iNotify and it worked fine. Wrote up some steps so I could remember on my blog if you're interested http://insomnia-consulting.org/2011/11/02/setting-up-rspec-and-rails -- Greg Akins http://twitter.com/akinsgre -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] How to define virtual attribute for date_select drop menu using active model
I have never done this. Just trying to help. I think the problem you're having is that your field doesn't have a date compatible value. If you check it's class it might be NilClass. Since the fields does not belong to a table date_select probably has no idea what to do with it because it doesn't have a 'type'. Have you tried to give the field a Date compatible value before your view is executed, just to try if the view works? Also, maybe type_cast (in ActiveRecord::ConnectionAdapters::Quoting: http://api.rubyonrails.org/ ) would help? On Tuesday, August 14, 2012 4:40:52 AM UTC-4, Loganathan Sellappa wrote: My model* doesn't use Activerecord* ORM, I need to do validation on the table less model, so I am using the Activemodel library, also I hope the virtual field are needs to be mentioned as attr_accessor and I am sorry to mention that the model is table less in previous mail, since I thought people will understand when I say Activemodel. regards, Loganathan ViewMe http://vizualize.me/loganathan On Tue, Aug 14, 2012 at 1:30 PM, Colin Law cla...@googlemail.comjavascript: wrote: On 14 August 2012 08:44, Loganathan Sellapa logana...@gmail.comjavascript: wrote: I thought it would create getter and setter methods for card_expiration_date and the active model library would do the rest(such as creating virtual attributes card_expiration_date(1i),card_expiration_date(2li),card_expiration_date(3li) for date time attribute(card_expiration_date), let me know if I am wrong. Please don't top post, it makes it difficult to follow the thread. Insert your reply inline in the previous message. Thanks. You don't need to specify att_accessor for fields in the database, ActiveRecord will supply them automatically. By providing them yourself you have disabled the automatic ones. I guess you are a beginner with Rails so I suggest that you work through some tutorials to understand the basics. railstutorial.org is good and is free to use online. Colin regards, Loganathan ViewMe On Tue, Aug 14, 2012 at 1:06 PM, Colin Law cla...@googlemail.comjavascript: wrote: On 14 August 2012 07:50, Loganathan Sellapa logana...@gmail.comjavascript: wrote: Hi All, I am using active model for payment process in my application , i am not able to add field for date field, since it throws error as below undefined method `card_expiration_date(3i)='. In model: include ActiveModel::Validations include ActiveModel::Conversion extend ActiveModel::Naming attr_accessor: card_expiration_date What is the purpose of the line above? Check the docs for attr_accessor to see what it does. Colin In view: %=f.date_select :card_expiration_date, :add_month_numbers = false,:discard_day = true, :start_year = (Date.today.year-10), :end_year = (Date.today.year+10),:order=[ :month,:year] % -- 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 rubyonra...@googlegroups.comjavascript: . To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- 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 rubyonra...@googlegroups.comjavascript: . To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- 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 rubyonra...@googlegroups.comjavascript: . To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/EL0Qv8uCIVkJ. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Ways to put online API documentation using rails
Hey mates! Currently I am building server data storage for mobile application with can be accessed via rest API. I am looking for some kind or ready2go software, which allows to produce documentation in https://parse.com/docs/rest style. Ideally, I'd like to store documentation in markdown and process it into HTML. I already took a look to nanoc. The problem is that I want to embed documentation inside rails app, not to build stand alone static website like https://docs.recurly.com/ Any ideas? -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: how to activate a rails application on a VPS
kramf wrote in post #1072156: Hello All, I have installed rvm ,ruby, rails ,passenger and apache2 on an Ubuntu 11.10 VPS. I have scaffolded a rails application and changed config of apache to point to it. When I entered my site from a browser I got the default rails page. When I removed the index.html file from the public folder I got a 404 error. When I changed my config.ru file to include the demo hello world rack app from the passenger-pushion site , I got the message displayed correctly on my browser. So what do I still miss to make my scaffold app run in response to browser input ? Thanks, David I didn't see mention of you setting up a root route. Did you do that? -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Defining a scope which compares a field against an array
Hello, I am defining the following scope for my model: class Entry ActiveRecord::Base attr_accessible :email, :published, :result_id, :text, :url belongs_to :result def self.not_filtered(keywords) where(['text NOT IN (?)', keywords]) if keywords.any? end This is supposed to return only Entries where the Entry.text doesn't contain any of the keywords. Example: entries.not_filtered([realtor, quadplex, duplex, condo, agent, broker]) But somehow this doesn't exclude the entires which include the keywords in the array. Is there a way to write that differently? How? -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/zhxFEkhmxLIJ. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: Defining a scope which compares a field against an array
I think squeel (https://github.com/ernie/squeel) is the best way to go: Person.where{name.like_any names} # = SELECT people.* FROM people WHERE ((people.name LIKE 'Ernie%' OR people.name LIKE 'Joe%' OR people.name LIKE 'Mary%')) On Wednesday, August 15, 2012 11:17:53 AM UTC-4, Kenny Meyer wrote: Hello, I am defining the following scope for my model: class Entry ActiveRecord::Base attr_accessible :email, :published, :result_id, :text, :url belongs_to :result def self.not_filtered(keywords) where(['text NOT IN (?)', keywords]) if keywords.any? end This is supposed to return only Entries where the Entry.text doesn't contain any of the keywords. Example: entries.not_filtered([realtor, quadplex, duplex, condo, agent, broker]) But somehow this doesn't exclude the entires which include the keywords in the array. Is there a way to write that differently? How? -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/tAo0RPmi_NAJ. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Using Jquery plugin tokenInput with rails
Colin, Yes, I did. I was using wrong dom id to save the tokeninput data and that was misleading my app. Regards Sumit Srivastava The power of imagination makes us infinite... On 15 August 2012 13:36, Colin Law clan...@googlemail.com wrote: On 13 August 2012 11:33, Colin Law clan...@googlemail.com wrote: On 13 August 2012 10:52, sumit srivastava sumit.theinvinci...@gmail.com wrote: ... I verified the html for the view. No error related to the form was found. What else could be the problem? Make sure there are no errors at all, if there are any errors anywhere on the page you cannot be sure that anything will work, as the browser is having to guess what you meant and sometimes it gets it wrong. It is the most basic rule of debugging, first fix all the problems that are clearly identified. You cannot imagine the amount of time that is wasted trying to track down a tricky bug, whilst saying that simple error that I know about cannot possibly cause this other problem in an entirely different bit of code which in the end turns out to be a side effect of the first problem. So fix all the html validation problems first. It may not fix the submit problem but you have to do it sometime after all, so do it now. The next time you find a website that is behaving strangely or does not look right then paste the url into the validator (I expect you saw that you can give it a url rather than paste in the code) and it is very likely there are errors. The site may well have been tested in one browser and the errors did not appear to matter. Using another browser, or even a update to the browser, can change the way it interprets invalid html and the page breaks. Hi Sumit. Have you solved this problem? Colin -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.