简体   繁体   中英

Unable to start Rails Server after updating to Rails 4

I just upgraded to rails 4, and when I run rails s, I get the output pasted below. I've made sure that my gems are up to date by running bundle install and bundle update , and I've consulted other SO pages with the same issues, but can't figure out what's going wrong with mine. Please help!

Codys-MacBook-Pro:club_website codyma$ rails s
=> Booting WEBrick
=> Rails 4.0.1 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-        4.0.1/lib/action_dispatch/middleware/stack.rb:107:in `delete': can't modify frozen Array (RuntimeError)
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-    4.0.1/lib/action_dispatch/middleware/stack.rb:107:in `delete'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/sass-rails-4.0.1/lib/sass/rails/railtie.rb:29:in `block in <class:Railtie>'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.1/lib/active_support/lazy_load_hooks.rb:36:in `call'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.1/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.1/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.1/lib/active_support/lazy_load_hooks.rb:44:in `each'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.1/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.1/lib/rails/application/finisher.rb:62:in `block in <module:Finisher>'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.1/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.1/lib/rails/initializable.rb:30:in `run'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/codyma/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /Users/codyma/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /Users/codyma/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /Users/codyma/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /Users/codyma/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /Users/codyma/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /Users/codyma/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.1/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.1/lib/rails/application.rb:215:in `initialize!'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/codyma/Development/club_website/config/environment.rb:5:in `<top (required)>'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `require'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `block in require'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:214:in `load_dependency'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `require'
from /Users/codyma/Development/club_website/config.ru:3:in `block in <main>'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from /Users/codyma/Development/club_website/config.ru:in `new'
from /Users/codyma/Development/club_website/config.ru:in `<main>'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.1/lib/rails/commands/server.rb:48:in `app'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.1/lib/rails/commands/server.rb:75:in `start'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.1/lib/rails/commands.rb:76:in `block in <top (required)>'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.1/lib/rails/commands.rb:71:in `tap'
from /Users/codyma/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.1/lib/rails/commands.rb:71:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

Maybe there's an error in your config.ru file.

For Rails 3:

# This file is used by Rack-based servers to start the application.

require ::File.expand_path('../config/environment',  __FILE__)
run YouApp::Application

For Rails 4:

# This file is used by Rack-based servers to start the application.

require ::File.expand_path('../config/environment',  __FILE__)
run Rails.application

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM