rspec 总是返回错误

发布于 2024-12-15 07:25:05 字数 1203 浏览 1 评论 0原文

我运行:

$ bundle exec rspec spec/

并收到此消息:

C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/lib/rspec/core.rb:78:in `require': no such file to load -- rspec/expectations (LoadError) 
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0 .1/lib/rspec/core.rb:78:in `<top (required)>' from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0 .1/lib/rspec/autorun.rb:1:in `require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/lib/rspec/autorun.rb:1:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/bin/rspec:2:in `require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/bin/rspec:2:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/bin/rspec:19:in `load'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/bin/rspec:19:in `<main>'

在我的 Gemfile 中:

group :development do
gem 'rspec-core', '2.0.1'
gem 'annotate', :git => 'git://github.com/ctran/annotate_models.git'
end

我需要做什么才能运行 rspec?

I run:

$ bundle exec rspec spec/

And receive this message:

C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/lib/rspec/core.rb:78:in `require': no such file to load -- rspec/expectations (LoadError) 
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0 .1/lib/rspec/core.rb:78:in `<top (required)>' from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0 .1/lib/rspec/autorun.rb:1:in `require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/lib/rspec/autorun.rb:1:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/bin/rspec:2:in `require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/bin/rspec:2:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/bin/rspec:19:in `load'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/bin/rspec:19:in `<main>'

In my Gemfile:

group :development do
gem 'rspec-core', '2.0.1'
gem 'annotate', :git => 'git://github.com/ctran/annotate_models.git'
end

What do I need to do in order to run rspec?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

只等公子 2024-12-22 07:25:05

rspec-rails,它安装核心以及 rspec 所需的其他内容。

http://rubydoc.info/gems/rspec-rails/frames

rspec-rails, which installs core, and others required by rspec.

http://rubydoc.info/gems/rspec-rails/frames

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文