rails 4 - Could not find generator rspec:install

扶醉桌前 提交于 2019-12-06 13:42:01
osleonard

Change what you have in your Gemfile to what is below and save

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

Then run bundle update and then bundle install

The accepted answer didn't work for me. Here's what did:

Try this command:

spring stop

then run again:

rails generate rspec:install

in the gem file, instead of adding

gem 'rspec', '~> 3.1.0'

to your selected environment, add

gem 'rspec-rails', '~> 3.1.0'

spring stop fixed it for me.

possibly related:

https://github.com/rails/spring/issues/486

Rails Spring breaking generators

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!