Reputation: 1
I am facing a problem starting the server for a ruby app built by somebody else. When I run the "ruby server/script" command, the following output is generated:
ruby script/server
./script/../config/../vendor/rails/railties/lib/initializer.rb:7:in `require': no such file to load -- rails/version (LoadError)
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:7
from ./script/../config/boot.rb:45:in `require'
from ./script/../config/boot.rb:45:in `load_initializer'
from ./script/../config/boot.rb:38:in `run'
from ./script/../config/boot.rb:11:in `boot!'
from ./script/../config/boot.rb:109
from script/server:2:in `require'
from script/server:2
I have looked, and looked and no solution seems in sight.
Specs:
Ruby 1.8.7,
Rails 2.2.2,
gem -v 1.8.25
EDIT:
After doing that, I still get the same error:
[dralexmv@archbang rubygame]$ ruby script/server
./script/../config/../vendor/rails/railties/lib/initializer.rb:7:in `require': no such file to load -- rails/version (LoadError)
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:7
Versions:
[dralexmv@archbang rubygame]$ gem -v
1.4.2
[dralexmv@archbang rubygame]$ rails -v
Rails 2.2.2
[dralexmv@archbang rubygame]$ ruby -v
ruby 1.8.7 (2012-10-12 patchlevel 371) [x86_64-linux]
EDIT: GEM LIST
*** LOCAL GEMS ***
actionmailer (2.2.2)
actionpack (2.2.2)
activerecord (2.2.2)
activeresource (2.2.2)
activesupport (2.2.2)
bundler (1.2.4)
json (1.7.7)
mysql (2.9.1)
rails (2.2.2)
rake (10.0.3)
rdoc (4.0.0)
rubygems-bundler (1.1.0)
rubygems-update (1.4.2)
rvm (1.11.3.6)
sqlite3 (1.3.7)
EDIT: Test on a test app
[dralexmv@archbang test_a]$ ruby script/server
=> Booting WEBrick...
=> Rails 2.2.2 application started on `http://0.0.0.0:3000`
=> Ctrl-C to shutdown server; call with --help for options
[2013-03-10 12:06:35] INFO WEBrick 1.3.1
[2013-03-10 12:06:35] INFO ruby 1.8.7 (2012-10-12) [x86_64-linux]
[2013-03-10 12:06:35] INFO WEBrick::HTTPServer#start: pid=11230 port=3000
Upvotes: 0
Views: 2155
Reputation: 10137
Downgrade your gem and try. Rails 2.X doesn't work with gem version greater than 1.5
sudo gem update --system 1.4.2
Upvotes: 1