-3

我在用:

  • Ubuntu 12.10
  • 导轨 3.2.12
  • ruby 1.9.3p194(2012-04-20 修订版 35410)[x86_64-linux]
  • 耙耙-10.0.4

当我运行时,rake db:create我收到此错误消息:

rake aborted!
cannot load such file -- spec
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
/home/lcastano/dev/roommateflatfinder/config/application.rb:7:in `<top (required)>'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/home/lcastano/dev/roommateflatfinder/Rakefile:5:in `<top (required)>'
/var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load'
/var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load_rakefile'
/var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:589:in `raw_load_rakefile'
/var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:89:in `block in load_rakefile'
/var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:88:in `load_rakefile'
/var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:72:in `block in run'
/var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
/var/lib/gems/1.9.1/gems/rake-10.0.4/bin/rake:33:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<main>'

我尝试卸载 rake 并重新安装它。其他人有同样的问题吗?

4

1 回答 1

2

问题

您的 Rakefile 或 Gemfile 中有无效的语句。您可能指的是“rspec”或“rspec-rails”。Rake 本身就是这样告诉你的:

无法加载此类文件 -- 规范

解决方案

删除 Rakefile 或 Gemfile 中对“spec”的引用,或将有问题的行替换为您尝试使用的 gem 或库的正确名称。

于 2013-04-08T01:33:30.257 回答