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!

4 comments
Comment actions Permalink

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.

Screen shot 2011-01-09 at 11.59.37 AM.png

0
Comment actions Permalink

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 :-)
0
Comment actions Permalink

Thanks you for clarification

I get the "Some Gems are not attached..." pop up (sorry, not exact wording).  I click "attach" link.



Open "Ruby Mine | Preferences... | Ruby SDK and Gems", and see a list of gems... no indication of attached gems (???).

Looks like a bug. We will try to reproduce it.

0
Comment actions Permalink

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



Screen shot 2011-02-07 at 7.54.08 PM.png



Get a required gems not attached.  When doing Attach/Install get the following:

Screen shot 2011-02-07 at 7.55.42 PM.png

rspec:install does not appear in the list of generators:

Screen shot 2011-02-07 at 7.56.28 PM.png

RubyMine:
Screen shot 2011-02-07 at 7.57.21 PM.png

OS:
Screen shot 2011-02-07 at 7.58.13 PM.png

0

Please sign in to leave a comment.