I created an rails api with the latest version of rails (Rails 5.0.0.beta2) and have the following rspec gems installed:
when I try to run
rails g rspec:install
I get the following error message:
Could not find generator 'rspec:install'. Maybe you meant 'assets', 'channel' or 'scaffold'
Runrails generate --helpfor more options.
I assume it is a bug with rails 5, but mb I just missed something very obvious.
I just started using rspec.
@Elux91 did you try off RSpec master? specifically, you'll want to have the following lines in your gemfile:
gem "rspec-core", :github => "rspec/rspec-core"
gem "rspec-expectations", :github => "rspec/rspec-expectations"
gem "rspec-mocks", :github => "rspec/rspec-mocks"
gem "rspec-support", :github => "rspec/rspec-support"
gem "rspec-rails", :github => "rspec/rspec-rails"
We haven't released a version of RSpec with rails 5 support yet, so until we do, you'll have to pull from git. If this works for you, let us know, if it doesn't, very let us know.
@samphippen @Elux91: FYI rails g rspec:install on RSpec master works fine for me!
@jordanyee can you try the RSpec 3.5.0.beta1 release?
thank is working
@samphippen works like a charm ;)
How do I use this RSpec master?
I have this issue:
Jonass-MBP:sample_app Money$ rails g rspec:install
Running via Spring preloader in process 48656
Could not find generator 'rspec:install'. Maybe you meant 'assets', 'channel' or 'scaffold'
Runrails generate --helpfor more options.
Even after I insert the following in the Gem file, the above error persist:
gem "rspec-core", :github => "rspec/rspec-core"
gem "rspec-expectations", :github => "rspec/rspec-expectations"
gem "rspec-mocks", :github => "rspec/rspec-mocks"
gem "rspec-support", :github => "rspec/rspec-support"
gem "rspec-rails", :github => "rspec/rspec-rails"
THank you!
You need to restart spring every time you do a bundle install.
I run:
spring stop
And then again:
rails generate rspec:install
But I get the same error:
Running via Spring preloader in process 1194
Could not find generator 'rspec:install'. Maybe you meant 'assets', 'channel' or 'scaffold'
What to do?
Thank you!
Problem solved.
1.
gem install sqlite3
2
gem list sqlite3
3.
Change sqlite3 version number in Gemfile.
4.
bundle install
5.
rails generate rspec:install
@JonasPreisler It doesn't work for me.
For step 3, does it mean that sqlite3 version has to be set as concrete version, i.e '1.3.13'?
Added the gem entries on the gem files - saves
Stopped the spring server
Restarted the spring server
Still getting the error
RSpec 3.6
I had the same problem. I was using gem rspec instead of gem 'rspec-rails', '~> 3.7'.
Most helpful comment
I run:
spring stopAnd then again:
rails generate rspec:installBut I get the same error:
Running via Spring preloader in process 1194 Could not find generator 'rspec:install'. Maybe you meant 'assets', 'channel' or 'scaffold'What to do?
Thank you!