rake db:reset抛出错误

时间:2015-04-09 18:32:11

标签: ruby-on-rails ruby api napa

我正在关注如何创建API的napa api framework tutorial。但是在运行rake db:reset时会引发以下错误

WARN: Unresolved specs during Gem::Specification.reset:
  minitest (~> 4.2)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
rake aborted!
NameError: uninitialized constant Virtus::Configuration::Coercible
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/virtus-1.0.5/lib/virtus/configuration.rb:40:in `initialize'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/virtus-1.0.5/lib/virtus/builder.rb:28:in `new'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/virtus-1.0.5/lib/virtus/builder.rb:28:in `call'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/virtus-1.0.5/lib/virtus.rb:152:in `model'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/representable-1.8.5/lib/representable/coercion.rb:5:in `<class:Coercer>'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/representable-1.8.5/lib/representable/coercion.rb:4:in `<module:Coercion>'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/representable-1.8.5/lib/representable/coercion.rb:3:in `<top (required)>'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/roar-0.12.9/lib/roar/representer/feature/coercion.rb:2:in `require'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/roar-0.12.9/lib/roar/representer/feature/coercion.rb:2:in `<top (required)>'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/napa-0.4.3/lib/napa/output_formatters/representer.rb:3:in `require'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/napa-0.4.3/lib/napa/output_formatters/representer.rb:3:in `<top (required)>'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/napa-0.4.3/lib/napa.rb:27:in `require'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/napa-0.4.3/lib/napa.rb:27:in `<top (required)>'
/home/jay/AppService/app.rb:6:in `require'
/home/jay/AppService/app.rb:6:in `<top (required)>'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:126:in `require'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:126:in `require'
/home/jay/AppService/Rakefile:6:in `<top (required)>'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load_rakefile'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:689:in `raw_load_rakefile'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:94:in `block in load_rakefile'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:93:in `load_rakefile'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:77:in `block in run'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/home/jay/.rbenv/versions/2.0.0-p576/lib/ruby/gems/2.0.0/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
/home/jay/.rbenv/versions/2.0.0-p576/bin/rake:23:in `load'
/home/jay/.rbenv/versions/2.0.0-p576/bin/rake:23:in `<main>'

任何帮助都将不胜感激。

1 个答案:

答案 0 :(得分:0)

一年后,我遇到了类似的问题。我已经解决了。在尝试通过Mac OS El Capitan上的Napa快速启动时,我注意到它正在拉纳帕0.51这是不兼容的。我做的第一件事是改为napa 0.5.0。

接下来的事情是将活动记录4.2.0从4.0.0更改为摆脱最小的宝石问题。

我希望这有助于第一次访问napa并且无法让quicstart工作。

另外,我尝试使用MySQl快速入门,而不是本教程使用的Postgres。