0

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
1
  • gem update --system 1.3.7 should fix the problem. Rails 2.x has some known issues running with gem -v 1.8.x Commented Mar 10, 2013 at 17:33

1 Answer 1

1

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
Sign up to request clarification or add additional context in comments.

13 Comments

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]
could you post gem list ??
gems look good. Try creating new app.. rails test_app and try starting server for newly created app.
I downloaded this project to make some modifications on it on my local machine. I cannot seem to be able to start the server even when I have done no changes. This project is known to work. Gem list posted above
I think you have different version of rails app which you downloaded. Is there bundler in that app?? Is there Gemfile in that app??
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.