Rails 3 error: no such file to load -- initializer (LoadError)
- by Bob
I'm on Ubuntu and my app is written for Rails 2.3.5 and I got it to run on 2.3.10 but when I upgraded to Rails 3.0.3 and tried to run it using "ruby script/server", it throws this error.
/usr/local/lib/site_ruby/1.8/rubygems.rb:230:in `activate': can't activate rails (= 2.3.10, runtime) for [], already activated rails-3.0.3 for [] (Gem::LoadError)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:35:in `require'
from /home/bob/savage/config/boot.rb:55:in `load_initializer'
from /home/bob/savage/config/boot.rb:38:in `run'
from /home/bob/savage/config/boot.rb:11:in `boot!'
from /home/bob/savage/config/boot.rb:110
from script/server:2:in `require'
from script/server:2
When I uninstalled Rails 2.3.10, it throws this error instead
bob@ubuntu:~/test.2.3.10$ ruby script/server
/usr/local/lib/site_ruby/1.8/rubygems.rb:777:in `report_activate_error': RubyGem version error: rails(3.0.3 not = 2.3.10) (Gem::LoadError)
from /usr/local/lib/site_ruby/1.8/rubygems.rb:211:in `activate'
from /usr/local/lib/site_ruby/1.8/rubygems.rb:1056:in `gem'
from /home/bob/test.2.3.10/config/boot.rb:60:in `load_rails_gem'
from /home/bob/test.2.3.10/config/boot.rb:54:in `load_initializer'
from /home/bob/test.2.3.10/config/boot.rb:38:in `run'
from /home/bob/test.2.3.10/config/boot.rb:11:in `boot!'
from /home/bob/test.2.3.10/config/boot.rb:114
from script/server:2:in `require'
from script/server:2
Ideas? Thanks in advance for your help.