I\'m trying to follow this tutorial here: http://railstutorial.org/chapters/static-pages#top
When I run:
$ rails generate rspec:install
Try installing it as a gem.
gem install rspec
with rails 3 in your config/environment.rb you maintain gems there with bundle install but in terms of what your doing you can just gem install rspec.
I realized that I had not saved after I updated my Gemfile
. I simply saved, ran bundle install
on the command line, and finally ran $ rails generate rspec:install
I had do both gem install rspec
and then add to gemfile as Andreas said.
using Rails 3.2.1 and ruby 1.9.3 at windows 7 and worked perfectly.
If you, like me, created a project, decided you wanted to archive the old directory and start again, but left spring
running in the background on accident, spring
won't reload from the correct directory and you'll be very confused.
The solution is to stop spring and let it restart on its own.
Remove all rspec versions by running the following commands as suggested by Sydney in another post and then install -V 2.0.1
gem uninstall rspec
gem uninstall rspec-core rspec-expectations rspec-mocks rspec-support
gem install rspec -v 2.0.1
add the following line to the gem file
gem 'rspec-rails', '~> 2.0.0'
and then run
rails generate rspec:install
it runs without any issues