RSpec: Could not find generator rspec:install
I installed latest Rspec gem and dependences, but when I call script/rails generate rspec:install
, I get this error: Could not find generator rspec:install.
Ruby 1.9.2 and Rails 3.0.3
My bundle list:
Using rake (0.8.7)
Using abstract (1.0.0)
Using activesupport (3.0.3)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.3)
Using erubis (2.6.6)
Using rack (1.2.1)
Using rack-mount (0.6.13)
Using rack-test (0.5.7)
Using tzinfo (0.3.24)
Using actionpack (3.0.3)
Using mime-types (1.16)
Using polyglot (0.3.1)
Using treetop (1.4.9)
Using mail (2.2.14)
Using actionmailer (3.0.3)
Using arel (2.0.7)
Using activerecord (3.0.3)
Using activeresource (3.0.3) 开发者_如何学运维
Using bundler (1.0.8)
Using diff-lcs (1.1.2)
Using mysql2 (0.2.6)
Using nokogiri (1.4.4)
Using thor (0.14.6)
Using railties (3.0.3)
Using rails (3.0.3)
Using rspec-core (2.4.0)
Using rspec-expectations (2.4.0)
Using rspec-mocks (2.4.0)
Using rspec (2.4.0)
Using rspec-rails (2.4.1)
Using webrat (0.7.3)
bundle:
group :development, :test do
gem 'rspec-rails'
end
group :test do
gem 'rspec'
gem 'webrat'
end
Upgrade to Bundler 1.0.9: gem install bundler
It was released on 1/19/2011 and fixes a bug where any gems included in :development, :test, etc. groups weren't loaded properly in rails.
Try to run it like this
rails g rspec:install RAILS_ENV="test"
精彩评论