Search code examples
ruby-on-rails-3webserverrubyminewebrick

Rails server fails to start with exit code 1 in rubymine


I was using my server yesterday no problem. Came back today with an error when starting the server

runnerw.exe C:\Ruby187\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) "C:/Users/Stefan/RubymineProjects/gallery/gallery-app/script/rails" server -b 127.0.0.1 -p 3000 -e development
=> Booting WEBrick
=> Rails 3.2.8 application starting in development on http://127.0.0.1:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:278:in `eval_block': C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-3.2.8/lib/action_dispatch/routing/mapper.rb:1508: syntax error, unexpected kEND, expecting $end (SyntaxError)
    from C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:297:in `clear!'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:297:in `each'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:297:in `clear!'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:35:in `clear!'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:33:in `each'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:33:in `clear!'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:15:in `reload!'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:26:in `updater'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.2.8/lib/active_support/file_update_checker.rb:78:in `call'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.2.8/lib/active_support/file_update_checker.rb:78:in `execute'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:27:in `updater'
    from C:0:in `execute_if_updated'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/application/finisher.rb:66
    from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `instance_exec'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `run'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/initializable.rb:55:in `run_initializers'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `each'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `run_initializers'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/application.rb:136:in `initialize!'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `send'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
    from C:/Users/Stefan/RubymineProjects/gallery/gallery-app/config/environment.rb:5
    from C:/Users/Stefan/RubymineProjects/gallery/gallery-app/config.ru:4:in `require'
    from C:/Users/Stefan/RubymineProjects/gallery/gallery-app/config.ru:4
    from C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
    from C:/Users/Stefan/RubymineProjects/gallery/gallery-app/config.ru:1:in `new'
    from C:/Users/Stefan/RubymineProjects/gallery/gallery-app/config.ru:1

Process finished with exit code 1

Not sure what could be causing this and it's baffling me why its only now decided to pop up.


Solution

  • I was able to fix this by reinstalling the actionpack gem. It must have got corrupt or I accidently changed it between last night and today.