简体   繁体   中英

rails - Could not find generator rspec:install.

I don't know it can't find the generator.

gem install rspec
Fetching: rspec-core-2.8.0.gem (100%)
Fetching: rspec-expectations-2.8.0.gem (100%)
Fetching: rspec-mocks-2.8.0.gem (100%)
Fetching: rspec-2.8.0.gem (100%)
Successfully installed rspec-core-2.8.0
Successfully installed rspec-expectations-2.8.0
Successfully installed rspec-mocks-2.8.0
Successfully installed rspec-2.8.0
4 gems installed
Installing ri documentation for rspec-core-2.8.0...
Installing ri documentation for rspec-expectations-2.8.0...
Installing ri documentation for rspec-mocks-2.8.0...
Installing ri documentation for rspec-2.8.0...
Installing RDoc documentation for rspec-core-2.8.0...
Installing RDoc documentation for rspec-expectations-2.8.0...
Installing RDoc documentation for rspec-mocks-2.8.0...
Installing RDoc documentation for rspec-2.8.0...

$bundle install
...
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
$ script/rails generate rspec:install
Could not find generator rspec:install.

I would add the following to your Gemfile, I think you're missing the rspec-rails gem.

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

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