-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't know how to build task 'spec:models' (see --tasks) #1776
Comments
I'd say somehow the rake task file isn't being detected by rake, what happens if you manually |
Here's what my Rakefile looks like after the change:
But then just running the rake command gives: I'm using rvm and my gems are in a gemset, does that change what the path should be? Thanks for the help! |
Drat, you probably need the full path to include the file as it's not a ruby file. I'm pretty sure this is an issue with how Rake and Rails are interacting to include the file though. |
@alexbrinkman did you add rspec-rails to your :development environment as well in your gem file? or just your :test environment? If I have rspec-rails only in the :test group, then the rake tasks do not work. But if I move it to :development, :test they work correctly. |
@urkle - Thanks for the information, that worked. I added rspec-rails to my development group too. Previously it was just in test. Thanks so much! |
When running
rake spec:models
I get the error:"Don't know how to build task 'spec:models' (see --tasks) "
Even though
rake -AT
produces:...
rake spec # Run all specs in spec directory (excluding plugin specs)
rake spec:controllers # Run the code examples in spec/controllers
rake spec:features # Run the code examples in spec/features
rake spec:helpers # Run the code examples in spec/helpers
rake spec:models # Run the code examples in spec/models
rake spec:prepare #
rake spec:statsetup #
...
Rails 5.0.1/Ruby 2.4/rspec-rails 3.5.1
I don't know if this is an rspec-rails issue, or a rake issue perhaps, or my own config issue??
The text was updated successfully, but these errors were encountered: