I have a Fedora Core 6 system on which I have built ruby 1.8.6 and rubygems 1.1.1 from source, and installed rails 2.0.2 using rubygems. When I create a new rails app, I get lots of errors that look like they''re coming from internal ruby libraries. Lots of methods redefined, as if I have some duplicate code somewhere. I also get errors when generating a simple model (see below.) I discovered that I did have duplicate installations of rails-2.0.2 under /usr/local/lib/ruby/ and /usr/lib64/ruby/. So, I uninstalled all the action* gems and rails, which removed them from /usr/local/, and then manually removed everything under /usr/lib64/ruby/gems/1.8/gems/. I then reinstalled rails with "gem install rails --include- dependencies." Everything went back into /usr/local/lib/ruby. No obvious errors. Next, I created a new rails app. Whoops! Same errors as before. Ideas, please? Also, how can I be sure rails is using the version of ruby I think it is? $ rails --version Rails 2.0.2 $ ruby --version ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux] $ gem --version 1.1.1 $ ls /usr/local/lib/ruby/gems/1.8/gems/ actionmailer-2.0.2 activeresource-2.0.2 cgi_multipart_eof_fix-2.5.0 gem_plugin-0.2.3 mongrel_cluster-1.0.5 net-sftp-1.1.1 rake-0.8.1 actionpack-2.0.2 activesupport-2.0.2 daemons-1.0.10 highline-1.4.0 mysql-2.7 net-ssh-1.1.2 activerecord-2.0.2 capistrano-2.2.0 fastthread-1.0.1 mongrel-1.1.4 needle-1.3.0 rails-2.0.2 $ ls /usr/lib64/ruby/gems/1.8/gems/ $ For all the lovely errors: click me: http://pastie.caboo.se/187859 --~--~---------~--~----~------------~-------~--~----~ 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-Apr-28 09:20 UTC
Re: method redefined errors from many core ruby libs
On 28 Apr 2008, at 03:44, zaven wrote:> > I have a Fedora Core 6 system on which I have built ruby 1.8.6 and > rubygems 1.1.1 from source, and installed rails 2.0.2 using rubygems.When you build ruby there is an option to say where it should live (and I do believe it defaults to /usr/local/lib). From an irb prompt you can verify this with require ''rbconfig'' Config::CONFIG If you actually have multiple ruby binaries, rails should just end up using whatever is on your PATH first. Fred> > When I create a new rails app, I get lots of errors that look like > they''re coming from internal ruby libraries. Lots of methods > redefined, as if I have some duplicate code somewhere. I also get > errors when generating a simple model (see below.) > > I discovered that I did have duplicate installations of rails-2.0.2 > under /usr/local/lib/ruby/ and /usr/lib64/ruby/. So, I uninstalled all > the action* gems and rails, which removed them from /usr/local/, and > then manually removed everything under /usr/lib64/ruby/gems/1.8/gems/. > I then reinstalled rails with "gem install rails --include- > dependencies." Everything went back into /usr/local/lib/ruby. No > obvious errors. Next, I created a new rails app. Whoops! Same errors > as before. > > Ideas, please? Also, how can I be sure rails is using the version of > ruby I think it is? > > $ rails --version > Rails 2.0.2 > $ ruby --version > ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux] > $ gem --version > 1.1.1 > > $ ls /usr/local/lib/ruby/gems/1.8/gems/ > actionmailer-2.0.2 activeresource-2.0.2 cgi_multipart_eof_fix-2.5.0 > gem_plugin-0.2.3 mongrel_cluster-1.0.5 net-sftp-1.1.1 rake-0.8.1 > actionpack-2.0.2 activesupport-2.0.2 daemons-1.0.10 > highline-1.4.0 mysql-2.7 net-ssh-1.1.2 > activerecord-2.0.2 capistrano-2.2.0 fastthread-1.0.1 > mongrel-1.1.4 needle-1.3.0 rails-2.0.2 > > $ ls /usr/lib64/ruby/gems/1.8/gems/ > $ > > For all the lovely errors: click me: http://pastie.caboo.se/187859 > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---