Kenneth McDonald
2008-Sep-30 16:18 UTC
error message ''undefined method `require_gem'' for main:Object (NoMethodError)''--how to resolve?
I''m getting the following when doing a db:migrate after installing RoR 2+: Macintosh-4:ui Ken$ rake db:migrate /usr/local/bin/rake:17: undefined method `require_gem'' for main:Object (NoMethodError) I have done a '' sudo gem update --system''. Any thoughts as to what might be causing this? This is on OS X 10.5 Thanks, Ken --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Sep-30 16:35 UTC
Re: error message ''undefined method `require_gem'' for main:Object (NoMethodError)''--how to resolve?
On Sep 30, 5:18 pm, Kenneth McDonald <kenneth.m.mcdon...-rphTv4pjVZMJGwgDXS7ZQA@public.gmane.org> wrote:> I''m getting the following when doing a db:migrate after installing RoR > 2+: > > Macintosh-4:ui Ken$ rake db:migrate > /usr/local/bin/rake:17: undefined method `require_gem'' for main:Object > (NoMethodError) > > I have done a '' sudo gem update --system''. Any thoughts as to what > might be causing this? >Your app was written for an old version of rubygems. require_gem was deprecated a while back (replaced with gem) and eventually removed. If you''ve just updated your app to a new version of rails, then running rake rails:update will update things like boot.rb which may have been using require_gem Fred> This is on OS X 10.5 > > Thanks, > Ken--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hunt Jon
2008-Sep-30 16:37 UTC
Re: error message ''undefined method `require_gem'' for main:Object (NoMethodError)''--how to resolve?
require_gem ''gemname'' is now to require ''rubygems'' require ''gemname'' This is how you convert. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Kenneth McDonald
2008-Sep-30 16:39 UTC
Re: error message ''undefined method `require_gem'' for main:Object (NoMethodError)''--how to resolve?
Heh, rake rails:update gives the same error. Sigh. Advice much appreciated, though. Apparently I have an old lib of some sort hanging around that needs to be updated, but I don''t know how to find out what it is, let alone do the update. I am running rails 2.x. Thanks, Ken On Sep 30, 2008, at 11:35 AM, Frederick Cheung wrote:> > > > On Sep 30, 5:18 pm, Kenneth McDonald > <kenneth.m.mcdon...-rphTv4pjVZMJGwgDXS7ZQA@public.gmane.org> wrote: >> I''m getting the following when doing a db:migrate after installing >> RoR >> 2+: >> >> Macintosh-4:ui Ken$ rake db:migrate >> /usr/local/bin/rake:17: undefined method `require_gem'' for >> main:Object >> (NoMethodError) >> >> I have done a '' sudo gem update --system''. Any thoughts as to what >> might be causing this? >> > > Your app was written for an old version of rubygems. require_gem was > deprecated a while back (replaced with gem) and eventually removed. > If you''ve just updated your app to a new version of rails, then > running rake rails:update will update things like boot.rb which may > have been using require_gem > > Fred >> This is on OS X 10.5 >> >> Thanks, >> Ken > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Kenneth McDonald
2008-Sep-30 16:43 UTC
Re: error message ''undefined method `require_gem'' for main:Object (NoMethodError)''--how to resolve?
Unfortunately, it''s not my code that''s causing the problem, and I don''t know what is out of date that I need to update. This all started when I upgraded to RoR 2.x (with dependencies). I can''t do anything about the code that''s in there, except try to figure out how to upgrade whatever is using this call. Thanks, Ken On Sep 30, 2008, at 11:37 AM, Hunt Jon wrote:> > require_gem ''gemname'' > > is now to > > require ''rubygems'' > require ''gemname'' > > This is how you convert. > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hunt Jon
2008-Sep-30 16:46 UTC
Re: error message ''undefined method `require_gem'' for main:Object (NoMethodError)''--how to resolve?
''rake'' itself is a gem. Can you try sudo gem update rake ? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Sep-30 16:46 UTC
Re: error message ''undefined method `require_gem'' for main:Object (NoMethodError)''--how to resolve?
On 30 Sep 2008, at 17:39, Kenneth McDonald wrote:> > Heh, rake rails:update gives the same error. Sigh. Advice much > appreciated, though. >Ah well you''ll just have to fix the files yourself. replace occurrences of require_gem with gem Fred> Apparently I have an old lib of some sort hanging around that needs to > be updated, but > I don''t know how to find out what it is, let alone do the update. I am > running rails 2.x. > > Thanks, > Ken > > On Sep 30, 2008, at 11:35 AM, Frederick Cheung wrote: > >> >> >> >> On Sep 30, 5:18 pm, Kenneth McDonald >> <kenneth.m.mcdon...-rphTv4pjVZMJGwgDXS7ZQA@public.gmane.org> wrote: >>> I''m getting the following when doing a db:migrate after installing >>> RoR >>> 2+: >>> >>> Macintosh-4:ui Ken$ rake db:migrate >>> /usr/local/bin/rake:17: undefined method `require_gem'' for >>> main:Object >>> (NoMethodError) >>> >>> I have done a '' sudo gem update --system''. Any thoughts as to what >>> might be causing this? >>> >> >> Your app was written for an old version of rubygems. require_gem was >> deprecated a while back (replaced with gem) and eventually removed. >> If you''ve just updated your app to a new version of rails, then >> running rake rails:update will update things like boot.rb which may >> have been using require_gem >> >> Fred >>> This is on OS X 10.5 >>> >>> Thanks, >>> Ken >>> > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
The error was obvious from the error message, once I looked at it closely; I needed to ''gem install rake'' :-) Thanks, Ken On Sep 30, 2008, at 11:39 AM, Kenneth McDonald wrote:> > Heh, rake rails:update gives the same error. Sigh. Advice much > appreciated, though. > > Apparently I have an old lib of some sort hanging around that needs to > be updated, but > I don''t know how to find out what it is, let alone do the update. I am > running rails 2.x. > > Thanks, > Ken > > On Sep 30, 2008, at 11:35 AM, Frederick Cheung wrote: > >> >> >> >> On Sep 30, 5:18 pm, Kenneth McDonald >> <kenneth.m.mcdon...-rphTv4pjVZMJGwgDXS7ZQA@public.gmane.org> wrote: >>> I''m getting the following when doing a db:migrate after installing >>> RoR >>> 2+: >>> >>> Macintosh-4:ui Ken$ rake db:migrate >>> /usr/local/bin/rake:17: undefined method `require_gem'' for >>> main:Object >>> (NoMethodError) >>> >>> I have done a '' sudo gem update --system''. Any thoughts as to what >>> might be causing this? >>> >> >> Your app was written for an old version of rubygems. require_gem was >> deprecated a while back (replaced with gem) and eventually removed. >> If you''ve just updated your app to a new version of rails, then >> running rake rails:update will update things like boot.rb which may >> have been using require_gem >> >> Fred >>> This is on OS X 10.5 >>> >>> Thanks, >>> Ken >>> > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---