Topic: Rspec not working on windows

Hi Folks,

I've been following the railstutorial.org/book and have run into a problem installing rspec. I have managed to get this to work before on windows xp, but on windows 7 I can't get it to work. I follow the install process:

1) Configured my gemfile like this:

source 'http://rubygems.org'

gem 'rails', '3.0.3'
gem 'sqlite3-ruby', '1.3.2', :require => 'sqlite3'

group :development do
  gem 'rspec-rails', '2.3.0'
end

group :test do
  gem 'rspec', '2.3.0'
  gem 'webrat', '0.7.1'
end

2) Running bundle install  (successfully)

3) Running rails generate rspec:install

I now have rspec installed, however I cannot run rspec form the command line, all I get is:

'rspec' is not recognised as an internal or external command, operable program or batch file.

I suspect that there's something wrong with my path but after googling and messing with this I cannto figure it out, any help would be very appreciated,

Thanks,

Jamie

Re: Rspec not working on windows

Ah somehow I fixed it, I uninstalled Ruby, and deleted the Ruby192 folder from my C drive. I then installed rspec using gem install rspec at the Ruby folder level, and now it works.

Re: Rspec not working on windows

I tired your method uninstall Ruby, and reinstall Ruby, then install rspec using bundle install, but still could not get it works.

D:\Projects\sample_app>rails generate rspec:install
   identical  .rspec
       exist  spec
   identical  spec/spec_helper.rb
       exist  autotest

D:\Projects\sample_app>rspec spec
'rspec' is not recognized as an internal or external command,
operable program or batch file.

will be grateful if you can help me.

Re: Rspec not working on windows

Did you delete the Ruby192 folder from your C drive?