Search code examples
ruby-on-railsapache2passengerredmine

update_rubygems throws "undefined method `find_by_path' for Gem::Specification:Class (NoMethodError)"


I'm using Redmine 1.0.3 and when accessing it I get the following error from Passenger:

Error message:

undefined method `name' for "actionmailer":String

Exception class:

NoMethodError

The suggested fix (see undefined method `name' for "actionmailer":String) doesn't work:

# gem install rubygems-update -v 1.3.5
Successfully installed rubygems-update-1.3.5
1 gem installed
# update_rubygems --version=1.3.5
Installing RubyGems 1.3.5
/usr/lib/ruby/1.9.1/rubygems.rb:206:in `try_activate': undefined method `find_by_path' for Gem::Specification:Class (NoMethodError)
        from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
        from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
        from /var/lib/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems/config_file.rb:34:in `<class:ConfigFile>'
        from /var/lib/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems/config_file.rb:12:in `<top (required)>'
        from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /var/lib/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems/gem_runner.rb:8:in `<top (required)>'
        from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from setup.rb:25:in `<main>'

My Ruby version is 1.9.3, my Rails version is 2.3.5.

Does anyone know how to fix this? Thanks in advance!


Solution

  • Downgrading my Ruby version to 1.8.7 solved this problem.