Daniel Higginbotham
2006-Aug-03 21:55 UTC
[Rails] Cannot find gem for Rails error from dispatch.cgi
Hi All, I''m developing a Rails app with Rails v1.1.4, but when I upload it to Dreamhost and try to serve it with dispatch.cgi, I get the error "Cannot find gem for Rails =1.1.4". However, I have installed the 1.1.4 gem in my home directory and set GEM_PATH to look there; additionally, rake throws no errors and "rails -v" displays "Rails 1.1.4". Any ideas? Thanks! Daniel Higginbotham
Jean-Charles Carelli
2006-Aug-03 22:46 UTC
[Rails] A bit of comprehension refusal. I cannot use the <association>_singular_ids method
A bit of comprehension refusal. I cannot use the <association>_singular_ids method. Is there a scope issue ? J-C class User has_many :roles end # Great ! > user = User.new # Still great ! > user.first_name = ''Sally'' # Things could not be better : ) > user.roles << [some collection] # Ditto, works fine. > user.roles.empty? # Kaboom ->->->-> NO METHOD ERROR > user.roles_singular_ids [2, 3] NoMethodError: undefined method `roles_singular_ids'' for #<User: 0x26d0334> from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.3/ lib/active_record/base.rb:1792:in `method_missing'' from (irb):2 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060803/95c55447/attachment-0001.html
Henning Kilset
2006-Aug-04 08:49 UTC
[Rails] Cannot find gem for Rails error from dispatch.cgi
Daniel Higginbotham wrote:> Hi All, > > I''m developing a Rails app with Rails v1.1.4, but when I upload it to > Dreamhost and try to serve it with dispatch.cgi, I get the error "Cannot find > gem for Rails =1.1.4". However, I have installed the 1.1.4 gem in my home > directory and set GEM_PATH to look there; additionally, rake throws no errors > and "rails -v" displays "Rails 1.1.4". Any ideas? >I don''t know Dreamhost''s webserver setup, but have you made sure that GEM_PATH can be read by the (Apache?) user the webserver runs under? And is the environment variable set specifically for that user?
Mark Reginald James
2006-Aug-05 01:29 UTC
[Rails] Re: A bit of comprehension refusal. I cannot use the <association>_singular_ids method
Jean-Charles Carelli wrote:> A bit of comprehension refusal. I cannot use the > <association>_singular_ids method. Is there a scope issue ? > > NoMethodError: undefined method `roles_singular_ids'' for #<User:0x26d0334>collection_singular_ids=ids should be read as <collection_singular>_ids=ids. That is, you want: role_ids = .... I think this could be made clearer in the API docs. -- We develop, watch us RoR, in numbers too big to ignore.
Daniel Higginbotham
2006-Aug-05 03:22 UTC
[Rails] Cannot find gem for Rails error from dispatch.cgi
I know that I''ve used gems installed in GEM_PATH before, but in any case I sidestepped the problem by doing rake rails:freeze:gems. Thanks though :) Daniel On Thursday 03 August 2006 22:49, Henning Kilset wrote:> Daniel Higginbotham wrote: > > Hi All, > > > > I''m developing a Rails app with Rails v1.1.4, but when I upload it to > > Dreamhost and try to serve it with dispatch.cgi, I get the error "Cannot > > find gem for Rails =1.1.4". However, I have installed the 1.1.4 gem in my > > home directory and set GEM_PATH to look there; additionally, rake throws > > no errors and "rails -v" displays "Rails 1.1.4". Any ideas? > > I don''t know Dreamhost''s webserver setup, but have you made sure that > GEM_PATH can be read by the (Apache?) user the webserver runs under? And > is the environment variable set specifically for that user? > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Jean-Charles Carelli
2006-Aug-05 15:04 UTC
[Rails] Re: A bit of comprehension refusal. I cannot use the <association>_singular_ids method
Many thanks for the syntax help. Works fine now. J-C On Aug 4, 2006, at 9:30 PM, Mark Reginald James wrote:> Jean-Charles Carelli wrote: >> A bit of comprehension refusal. I cannot use the >> <association>_singular_ids method. Is there a scope issue ? >> NoMethodError: undefined method `roles_singular_ids'' for #<User: >> 0x26d0334> > > collection_singular_ids=ids should be read as > <collection_singular>_ids=ids. > That is, you want: > > role_ids = .... > > I think this could be made clearer in the API docs. > > -- > We develop, watch us RoR, in numbers too big to ignore. > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails