简体   繁体   English

孢子未正确安装在导轨上

[英]spork not installed correctly on rails

I write my first rails project. 我写了我的第一个Rails项目。 So far I've followed some tutorial and had my unit tests runing with rspec. 到目前为止,我已经遵循了一些教程,并使用rspec运行了单元测试。

Now I tried to install spork using several other tutorials and neither spork nor the unit tests work. 现在,我尝试使用其他一些教程来安装spork,但spork和单元测试均无效。

When I activate spork it is up but then says: 当我激活spork时,它就起来了,但是然后说:

no such file to load -- rspec/rails . 没有这样的文件要加载-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: 这是我的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

any idea? 任何想法? please be specific as it's my first project. 请具体说明,因为这是我的第一个项目。

Your rspec-rails gem is not currently accessible by the test environment. test环境当前无法访问您的rspec-rails gem。 Change your rspec-rails block to this: 将您的rspec-rails块更改为:

group :development, :test do
  gem 'rspec-rails', '2.5.0'
end

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM