Could not find generator rspec:install.

后端 未结 11 667
一向
一向 2021-01-01 08:03

I\'m trying to follow this tutorial here: http://railstutorial.org/chapters/static-pages#top

When I run:

$ rails generate rspec:install

11条回答
  •  一生所求
    2021-01-01 09:10

    Remove all rspec versions by running the following commands as suggested by Sydney in another post and then install -V 2.0.1

    gem uninstall rspec
    gem uninstall rspec-core rspec-expectations rspec-mocks rspec-support
    gem install rspec -v 2.0.1
    

    add the following line to the gem file

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

    and then run

    rails generate rspec:install
    

    it runs without any issues

提交回复
热议问题