简体   繁体   中英

rails g rspec:install << returns >> Could not find generator rspec:install

I can't get rSpec installed for Rails 3.

I'm running Ruby -v=1.8.7, Rails -v=3.0.0.beta4

So far I have..

 git clone git://github.com/indirect/rails3-generators.git lib/generators

My GemFile :

 group :test do
   gem 'rspec'
   gem 'rspec-rails'
   gem "factory_girl"
   gem 'cucumber-rails'
 end 

I ran :

bundle install

Then :

rails g rspec:install

I get :

 Could not find generator rspec:install.

You might need to list rspec-rails as part of the development group as well:

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

I just solved this same issue using Ruby 1.8.7 and Rails 3.0.3

I had to run sudo gem update , which updated bundler and then rails generate rspec:install worked for me.

Hmm..I'm under the impression people might have solved this in other ways, but I just chose Rspec 2 for Rails 3 and it seems to have installed right.

My Gemfile:

gem 'rspec-rails', '2.0.0.beta.7'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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