开发者

Ruby On Rails: Couldn't find 'rspec' generator?

trying to learn ruby on rails at the moment and currently learning about testing. The tutorial I'm following uses rspec, so I ran the commands:

sudo gem install rspec
sudo gem install rspec-rails
script/generate rspec

only to get an error message "Couldn't find 'rspec' generator". I've searched for an answer开发者_开发知识库 on this topic but I can't find a clear one anywhere.

I'm running Ubuntu 10.10, with ruby 1.8.7, rails 2.3.5 and rspec/rspec-rails 2.0.0

Any ideas how to get this generator to work?


For Rails 2 you need to install rspec-rails-1.3.3 or older. rspec-rails-2.0.0 does not support rails 2.


in config/environments/test.rb:

config.gem 'rspec', :lib => false
config.gem 'rspec-rails', :lib => false

See if that doesn't help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜