Hello Friends, This is a very common warning that everyone gets. I upgarded my gem and rails version to gem 0.9.2 and rails1.2.3 After i changed the version i got the warning "warning: require_gem is obsolete. Use gem instead". so i changed all the require_gem to gem. but after i changed it i got an error ./nxw-persistency-0.2/photo.rb:22: uninitialized constant Crystallizer::ActiveRecord (NameError) from C:/Program Files/ruby/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `gem_original_require'' from C:/Program Files/ruby/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `require'' my code where i am getting an error module Crystallizer require ''rubygems'' gem ''activerecord'' class Photo < ActiveRecord::Base(ERROR IS ON THIS LINE) Any kind of help will be appreciated Thank you --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> my code where i am getting an error > > module Crystallizer > > require ''rubygems'' > gem ''activerecord''What you want is just require ''activerecord'' gem is only needed if you''re looking to specify a specific version of the gem. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
DHH wrote:>> my code where i am getting an error >> >> module Crystallizer >> >> require ''rubygems'' >> gem ''activerecord'' > > What you want is just > > require ''activerecord'' > > gem is only needed if you''re looking to specify a specific version of > the gem.when doing just require on my windows box it fails though and says it has no idea what your talking about. thoughts? -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Zach Inglis // LT3media
2007-May-16 21:55 UTC
Re: warning: require_gem is obsolete. Use gem instead.
What is the specific error (as opposed to ''no idea what i''m talking about'') That could help a bit more. Zach On May 16, 2007, at 4:53 PM, john wrote:> > DHH wrote: >>> my code where i am getting an error >>> >>> module Crystallizer >>> >>> require ''rubygems'' >>> gem ''activerecord'' >> >> What you want is just >> >> require ''activerecord'' >> >> gem is only needed if you''re looking to specify a specific version of >> the gem. > > when doing just require on my windows box it fails though and says it > has no idea what your talking about. > > thoughts? > > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
simple fix is to (useing rails 1.2.3) generate a new directory tree and copy the new dir tree onto the old one which should over write your base files with the new versions without deleting your controllers/models/etc. then go into the enviroments file and change the rails version number from 1.1.6(or what ever) to 1.2.3 then you should be good to go. WARNING: back up your files first (your using svn right?) hope this helps -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Zach Inglis // LT3media wrote:> What is the specific error (as opposed to ''no idea what i''m talking > about'') > > That could help a bit more. > > Zachc:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_re quire'': no such file to load -- activerecord (LoadError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `re quire'' from estimate_dt.rb:2 and the code is require ''rubygems'' require ''activerecord'' thanks -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I had the same problem. It was solved by adding an underscore: require "rubygems" require "active_record" -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---