0
我運行:rspec的它總是返回錯誤
$ 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的?
運行$ gem install rspec-rails修復了這個問題。謝謝! – Jarred
@Jarred Awesome;真高興你做到了。 –