在上一个会话中运行rake db:migrate之后,Rails服务器在启动后退出

在上一个会话中运行rake db:migrate之后,我遇到启动rails服务器的问题。 我已经安装了设计并在我的应用程序中设置了一个新的数据库,这似乎运行正常,但我重启我的应用程序后无法启动新的服务器。 有什么想法吗?

Taylors-MacBook-Pro:pinteresting taylorburton$ rails s => Booting WEBrick => Rails 4.2.0 application starting in development on http://localhost:3000 => Run `rails server -h` for more startup options => Ctrl-C to shutdown server Exiting /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/devise-3.3.0/lib/devise/rails/routes.rb:457:in `ensure in with_devise_exclusive_scope': undefined method `merge!' for # (NoMethodError) from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/devise-3.3.0/lib/devise/rails/routes.rb:457:in `with_devise_exclusive_scope' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/devise-3.3.0/lib/devise/rails/routes.rb:248:in `block (2 levels) in devise_for' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/devise-3.3.0/lib/devise/rails/routes.rb:351:in `block in devise_scope' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/actionpack-4.2.0/lib/action_dispatch/routing/mapper.rb:940:in `block in constraints' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/actionpack-4.2.0/lib/action_dispatch/routing/mapper.rb:816:in `scope' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/actionpack-4.2.0/lib/action_dispatch/routing/mapper.rb:940:in `constraints' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/devise-3.3.0/lib/devise/rails/routes.rb:350:in `devise_scope' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/devise-3.3.0/lib/devise/rails/routes.rb:247:in `block in devise_for' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/devise-3.3.0/lib/devise/rails/routes.rb:223:in `each' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/devise-3.3.0/lib/devise/rails/routes.rb:223:in `devise_for' from /Users/taylorburton/Desktop/pinteresting/config/routes.rb:2:in `block in ' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:423:in `instance_exec' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:423:in `eval_block' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/actionpack-4.2.0/lib/action_dispatch/routing/route_set.rb:401:in `draw' from /Users/taylorburton/Desktop/pinteresting/config/routes.rb:1:in `' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598@global/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598@global/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `block in load' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598@global/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598@global/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:40:in `block in load_paths' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:40:in `each' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:40:in `load_paths' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:16:in `reload!' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:26:in `block in updater' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598@global/gems/activesupport-4.2.0/lib/active_support/file_update_checker.rb:75:in `call' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598@global/gems/activesupport-4.2.0/lib/active_support/file_update_checker.rb:75:in `execute' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:27:in `updater' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/railties-4.2.0/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/railties-4.2.0/lib/rails/application/finisher.rb:69:in `block in ' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers' from /Users/taylorburton/.rvm/rubies/ruby-2.0.0-p598/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each' from /Users/taylorburton/.rvm/rubies/ruby-2.0.0-p598/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component' from /Users/taylorburton/.rvm/rubies/ruby-2.0.0-p598/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from' from /Users/taylorburton/.rvm/rubies/ruby-2.0.0-p598/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component' from /Users/taylorburton/.rvm/rubies/ruby-2.0.0-p598/lib/ruby/2.0.0/tsort.rb:180:in `each' from /Users/taylorburton/.rvm/rubies/ruby-2.0.0-p598/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component' from /Users/taylorburton/.rvm/rubies/ruby-2.0.0-p598/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!' from /Users/taylorburton/Desktop/pinteresting/config/environment.rb:5:in `' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598@global/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598@global/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598@global/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598@global/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require' from /Users/taylorburton/Desktop/pinteresting/config.ru:3:in `block in ' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598@global/gems/rack-1.6.0/lib/rack/builder.rb:55:in `instance_eval' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598@global/gems/rack-1.6.0/lib/rack/builder.rb:55:in `initialize' from /Users/taylorburton/Desktop/pinteresting/config.ru:in `new' from /Users/taylorburton/Desktop/pinteresting/config.ru:in `' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598@global/gems/rack-1.6.0/lib/rack/builder.rb:49:in `eval' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598@global/gems/rack-1.6.0/lib/rack/builder.rb:49:in `new_from_string' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598@global/gems/rack-1.6.0/lib/rack/builder.rb:40:in `parse_file' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598@global/gems/rack-1.6.0/lib/rack/server.rb:299:in `build_app_and_options_from_config' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598@global/gems/rack-1.6.0/lib/rack/server.rb:208:in `app' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/railties-4.2.0/lib/rails/commands/server.rb:61:in `app' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598@global/gems/rack-1.6.0/lib/rack/server.rb:336:in `wrapped_app' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/railties-4.2.0/lib/rails/commands/server.rb:139:in `log_to_stdout' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/railties-4.2.0/lib/rails/commands/server.rb:78:in `start' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:80:in `block in server' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/railties-4.2.0/lib/rails/commands.rb:17:in `' from /Users/taylorburton/Desktop/pinteresting/bin/rails:8:in `require' from /Users/taylorburton/Desktop/pinteresting/bin/rails:8:in `' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/spring-1.3.3/lib/spring/client/rails.rb:27:in `load' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/spring-1.3.3/lib/spring/client/rails.rb:27:in `call' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/spring-1.3.3/lib/spring/client/command.rb:7:in `call' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/spring-1.3.3/lib/spring/client.rb:26:in `run' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/spring-1.3.3/bin/spring:48:in `' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/spring-1.3.3/lib/spring/binstub.rb:11:in `load' from /Users/taylorburton/.rvm/gems/ruby-2.0.0-p598/gems/spring-1.3.3/lib/spring/binstub.rb:11:in `' from /Users/taylorburton/Desktop/pinteresting/bin/spring:13:in `require' from /Users/taylorburton/Desktop/pinteresting/bin/spring:13:in `' from bin/rails:3:in `load' from bin/rails:3:in `' 

试试这个:

在您的Gemfile中,更改版本如下:

 gem 'devise', '~> 3.4.0' 

而不是在你的终端运行:

 bundle update devise