为用户安装设备后出现此错误
C:3:in `rescue in execute_if_updated': Rails::Application::RoutesReloader#execut
e_if_updated delegated to updater.execute_if_updated, but updater is nil: #<Rail
s::Application::RoutesReloader:0x3900780 @paths=["C:/ror/wishlistize/config/rout
es.rb"], @route_sets=[#<ActionDispatch::Routing::RouteSet:0x393a140>]> (RuntimeE
rror)
from C:131071:in `execute_if_updated'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/applic
ation/finisher.rb:69:in `block in <module:Finisher>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/initia
lizable.rb:30:in `instance_exec'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/initia
lizable.rb:30:in `run'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/initia
lizable.rb:55:in `block in run_initializers'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each
_strongly_connected_component'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_
component_from'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_c
onnected_component'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:180:in `each'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_
component'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/initia
lizable.rb:54:in `run_initializers'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/applic
ation.rb:215:in `initialize!'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/railti
e/configurable.rb:30:in `method_missing'
from C:/ror/wishlistize/config/environment.rb:5:in `<top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_
support/dependencies.rb:228:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_
support/dependencies.rb:228:in `block in require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_
support/dependencies.rb:213:in `load_dependency'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_
support/dependencies.rb:228:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/applic
ation.rb:189:in `require_environment!'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/comman
ds.rb:45:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
我不确定是不是因为设计
这是我的路线文件
Wishlistize::Application.routes.draw do
devise_for :users
end
和环境.rb
# Load the Rails application.
require File.expand_path('../application', __FILE__)
# Initialize the Rails application.
Wishlistize::Application.initialize!
当我运行 rake db:migrate 用户模型时,我得到了这个:
class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :token_authenticatable, :confirmable,
# :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
end