How do I run the "rspec:install" generator?
Hello,
Trying RubyMine on the thirty-day trial... thanks for doing that, it's cool.
I'm setting up a new project, and I use RSpec for testing. So I've added 'rspec-rails' to my Gemfile, and RubyMine politely :-) added the gem.
However, according to http://relishapp.com/rspec/rspec-rails I should then do "script/rails generate rspec:install". I've done this from the command line on previous projects, so I know that the "script/" part is optional, making me think it's a "real" generator.
However, when I run the "Tools -> Run Rails Generator..." menu item, the type-in box knows nothing of "rspec:install" as a possible generator. Doing the "[Reload generators list]" doesn't help.
OH YEAH: Same question for cucumber.
I'm running RubyMine 3.0.1, Rails 3.0.3, RSpec-rails 2.4.1, etc. I just did an update of all the gems, so I'm pretty sure it's all up to date.
Thanks!
请先登录再写评论。
Please check that

1. rspec-rails gem is mentioned in Gemfile
2. RSpec support is enabled in Rubymine - i.e. "rspec-rails" gem is shown in RubyMine | Settings | RubySDK and Gems| Gems list of "attached" gems.
Okay, here's what I've tried.
Create a new project.
Open the Gemfile, add:
group :development, :test do
gem 'rspec-rails'
end
Save. I get the "Some Gems are not attached..." pop up (sorry, not exact wording). I click "attach" link.
Check Generators, nothing for "rspec".
Open "Ruby Mine | Preferences... | Ruby SDK and Gems", and see a list of gems... no indication of attached gems (???). Anyway, I click on the "Attach Gems..." button, choose "rspec-rails", click "Attach", click "Apply", click "OK".
Check Generators, nothing for "rspec".
I then tried "[Reload generators list]" from the Generators list, and it shows up! Cool!
Problem solved :-)
Thanks you for clarification
Looks like a bug. We will try to reproduce it.
Appear to be having the same problem. Have all rspec gems listed with correct version.
Gemfile:
source 'http://rubygems.org'
gem 'rails', '3.0.3'
gem 'sqlite3-ruby', :require => 'sqlite3'
group :development do
gem 'rspec-rails', '2.0.1'
end
group :test do
gem 'rspec', '2.0.1'
gem 'webrat', '0.7.1'
end
Get a required gems not attached. When doing Attach/Install get the following:
rspec:install does not appear in the list of generators:
RubyMine:
OS: