Search code examples
ruby-on-railsrubymine

can't run rails server (activesupport error)


in my application, in the last few days, i'm unable to run the rails server/rails s or even bundle exec rails server command any more. it was running like a charm before.

i tried to revert the changes using git, but no luck, i tried all the possible proprieties i could think of. i use rubymine, but same problem when using the Terminal .

when i run:

ma@SL510:~/ts$ rails server

i get the following error stack trace :

from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
    from /home/ma/.rvm/gems/ruby-1.9.3-p392@global/gems/unicorn-4.6.2/lib/unicorn/http_request.rb:4:in `<top (required)>'
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
    from /home/ma/.rvm/gems/ruby-1.9.3-p392@global/gems/unicorn-4.6.2/lib/unicorn.rb:103:in `<top (required)>'
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `require'
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `each'
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `block in require'
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `each'
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `require'
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler.rb:132:in `require'
    from /home/ma/ts/config/application.rb:16:in `<top (required)>'
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require'
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:53:in `block in <top (required)>'
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

i don't know how could i fix this, to get the rails server command to run again ! any help would be appreciate it !

ps: please tell me if i need to provide more info. Thanks.


Solution

  • You may try to create a brand new gemset (and use it), then bundle install so that Bundler install gems listed in your Gemfile. The stacktrace seems to indicate you're using the global gemset, which is a really bad idea.