Rails rspec generator error [not found]

I use rails 4.1.1

When i execute the command rails g generator my_generator

The generator works, but always ends on error rspec [not found]

I added gems rspecand rspec-railsto your Gemfile.

What step am I missing to get this to work?

+4
source share
2 answers

You do not need to add rspecgem to your files, just rspec-rails.

After bundle installrun, rails generate rspec:installand everything should work fine.

+3
source

Recommended way to install RSpec using the rspec-rails repository :

rspec-rails :development :test Gemfile:

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

bundle install RSpec .

0

Source: https://habr.com/ru/post/1546379/


All Articles