我正在开发一个rails插件。我也想用它设计...
这是其gemspec的摘录:
s.add_dependency "rails", "~> 4.1.0"
s.add_dependency "devise"
这是我检索的错误日志:
→ RAILS_ENV=test rake db:migrate
rake aborted!
NameError: uninitialized constant Devise
/Users/boti/Rails/multitenancy/subscribem/config/initializers/devise.rb:3:in `<top (required)>'
/Users/boti/.rvm/gems/ruby-2.1.1@multitenancy/gems/railties-4.1.0/lib/rails/engine.rb:648:in `block in load_config_initializer'
/Users/boti/.rvm/gems/ruby-2.1.1@multitenancy/gems/activesupport-4.1.0/lib/active_support/notifications.rb:161:in `instrument'
/Users/boti/.rvm/gems/ruby-2.1.1@multitenancy/gems/railties-4.1.0/lib/rails/engine.rb:647:in `load_config_initializer'
/Users/boti/.rvm/gems/ruby-2.1.1@multitenancy/gems/railties-4.1.0/lib/rails/engine.rb:612:in `block (2 levels) in <class:Engine>'
/Users/boti/.rvm/gems/ruby-2.1.1@multitenancy/gems/railties-4.1.0/lib/rails/engine.rb:611:in `each'
/Users/boti/.rvm/gems/ruby-2.1.1@multitenancy/gems/railties-4.1.0/lib/rails/engine.rb:611:in `block in <class:Engine>'
/Users/boti/.rvm/gems/ruby-2.1.1@multitenancy/gems/railties-4.1.0/lib/rails/initializable.rb:30:in `instance_exec'
/Users/boti/.rvm/gems/ruby-2.1.1@multitenancy/gems/railties-4.1.0/lib/rails/initializable.rb:30:in `run'
/Users/boti/.rvm/gems/ruby-2.1.1@multitenancy/gems/railties-4.1.0/lib/rails/initializable.rb:55:in `block in run_initializers'
/Users/boti/.rvm/gems/ruby-2.1.1@multitenancy/gems/railties-4.1.0/lib/rails/initializable.rb:54:in `run_initializers'
/Users/boti/.rvm/gems/ruby-2.1.1@multitenancy/gems/railties-4.1.0/lib/rails/application.rb:288:in `initialize!'
/Users/boti/Rails/multitenancy/subscribem/spec/dummy/config/environment.rb:5:in `<top (required)>'