spork 未正确安装在导轨上
我编写了我的第一个 Rails 项目。到目前为止,我已经遵循了一些教程,并使用 rspec 运行了单元测试。
现在我尝试使用其他几个教程安装 spork,但 spork 和单元测试都不起作用。
当我激活 spork 时,它已启动,但随后显示:
没有要加载的文件 - rspec/rails。
C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/activ
e_support/dependencies.rb:239:in `require': no such file to load -- rspec/rails
(LoadError)
这是我的 gem 文件:
source 'http://rubygems.org'
gem 'rails', '3.0.9'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3-ruby', '1.3.2', :require => 'sqlite3'
group :development do
gem 'rspec-rails', '2.5.0'
end
group :test do
gem 'rspec', '2.5.0'
gem 'webrat', '0.7.1'
gem 'spork', '0.8.5'
gem 'win32-process'
end
知道吗?请具体说明,因为这是我的第一个项目。
I write my first rails project. So far I've followed some tutorial and had my unit tests runing with rspec.
Now I tried to install spork using several other tutorials and neither spork nor the unit tests work.
When I activate spork it is up but then says:
no such file to load -- rspec/rails.
C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/activ
e_support/dependencies.rb:239:in `require': no such file to load -- rspec/rails
(LoadError)
Here is my gem file:
source 'http://rubygems.org'
gem 'rails', '3.0.9'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3-ruby', '1.3.2', :require => 'sqlite3'
group :development do
gem 'rspec-rails', '2.5.0'
end
group :test do
gem 'rspec', '2.5.0'
gem 'webrat', '0.7.1'
gem 'spork', '0.8.5'
gem 'win32-process'
end
any idea? please be specific as it's my first project.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
test
环境当前无法访问您的rspec-rails
gem。将您的 rspec-rails 块更改为:Your
rspec-rails
gem is not currently accessible by thetest
environment. Change yourrspec-rails
block to this: