Welcome to Working With Rails

 

Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
can't run rails after upgrade
5 Posts
can't run rails after upgrade

Hi,

After upgrading my Linux server from FC6 to FC7, I can't execute any rails projects, all with the following error:

/usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:92:in load_specification': private methodspecification_version=' called for # (NoMethodError)

from /usr/lib/ruby/site_ruby/1.8/rubygems/specification.rb:421:in `initialize'
from (eval):3:in `new'
from (eval):3:in `load_specification'
from /usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:128:in `eval'
from /usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:92:in `load_specification'
from /usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:128:in `load_gems_in'
from /usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:127:in `each'
from /usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:127:in `load_gems_in'
 ... 14 levels...
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:111:in `manage_gems'
from /usr/bin/gem:10

Does anyone know how to fix it?

thanks, Kelvin

Can't say for sure, but wonder if you have gems with native components? Maybe you need to rerun the build of the gems because your underlying Linux libs have changed?

Go to the gem directories (Ubuntu Hardy Heron is /usr/local/lib/ruby/gems/1.8/gems - it can be different). Take a backup of this directory :). Then try something like

for i in * ; do cd $i ; sudo ruby extconf.rb ; cd .. ; done

If there is no extconf.rb then it will complain - ignore this. Then see if stuff will run.

Failing everything you could try removing and reinstalling the gems.

This is quite dangerous so make sure you have a backup of the gems directory.

Sorry - just realised may have misled you by jumping to conclusions. If your Ruby was compiled from source you'll need to recompile and reinstall.

If it was installed from a repository the first thing you need to do is update whatever your Linux uses to point to its repositories and make sure your Ruby is up to date.

Then see if you can you run Ruby on its own, e.g. irb? If not fix that first - Have a look on the web for how to do this.

My Ruby and Gems are installed from repository, all pakages are most updated in Fedora 7, unless I further upgrade the OS...

irb works fine.

Is there any other way round?

I did find this:

http://programmers-blog.com/2008/11/11/ruby-gems-private-method-specification_version-problem

But it seems to refer to Ruby 1.9? What does ruby --version give you?

I wonder if your upgrade has moved you to 1.9?

5 Posts
Login to add your message