Method redefined errors from many core ruby libs

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

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs