[rspec-users] rspec and rspec-rails install hell
James B. Byrne
byrnejb at harte-lyne.ca
Wed Jun 11 14:53:28 EDT 2008
I am attending a training course covering rspec. I am using a MS WinXPpro SP3
machine. I have installed the cygwin environment. I am using git 1.5.4. I am
using ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] and rails 2.0.2
(albeit rails 2.1.0 is installed as well)
I had to install rspec-rails and rspec via git and as a gem.
Problem 1.
If one goes to the rspec.info website and links through to download one sees:
>From source (at github)
http://github.com/dchelimsky/rspec/wikis/home
http://github.com/dchelimsky/rspec-rails/wikis/home
BUT! If one tries to install via git-clone form this repository one sees this!
C:\temp\>git clone http://github.com/dchelimsky/rspec/wikis/home /tmprspec
Initialized empty Git repository in /tmprspec/.git/
Cannot get remote repository information.
Perhaps git-update-server-info needs to be run there?
Poking around one finds buried under Documentation >> Spec::Rails >> Install
a link to github wherein one sees this:
Install RSpecs edge for rails <= 2.0.2
cd vendor/plugins
git clone git://github.com/dchelimsky/rspec.git
git clone git://github.com/dchelimsky/rspec-rails.git
cd ../../
script/generate rspec
The git repository works.
But, this leads to problem 2.
> ruby script/generate rspec
Couldn't find 'rspec' generator
Now What???!!!
So, poking around the googlespace I find reference to gem install
rspec_generator so, I do that:
> gem install rspec_generator
Successfully installed rspec-0.5.15
Successfully installed rspec_generator-0.5.15
2 gems installed
Installing ri documentation for rspec-0.5.15...
Installing RDoc documentation for rspec-0.5.15...
rspec-0.5.15 ????
Ok, now I have
1. rspec-0.5.15
2. rspec-1.1.4
installed and the latest from github in my project, which is required because
I need rspec-rails. So, I run ruby script/generate rspec and then I
encounter:
Problem 3.
>rake spec
(in C:/temp/tmprspec)
C:/temp/labs/08_rspec_rails/prag_hotel/vendor/plugins/rspec-rails/lib/spec/rails
/version.rb:11: (RuntimeError)
############################################################################
Your RSpec on Rails plugin is incompatible with your installed RSpec.
RSpec : 20080526202855
RSpec on Rails : 20080608062339
Make sure your RSpec on Rails plugin is compatible with your RSpec gem.
See http://rspec.rubyforge.org/documentation/rails/install.html for details.
############################################################################
Bearing in mind that I have JUST THIS INSTANT installed both the gem rspec and
the plugins this leaves me somewhat nonplussed. However, sycn problems do
happen so now I do this:
> gem uninstall rspec
Select gem to uninstall:
1. rspec-0.5.15
2. rspec-1.1.4
3. All versions
> 3
You have requested to uninstall the gem:
rspec-0.5.15
rspec_generator-0.5.15 depends on [rspec (= 0.5.15)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn] y
Successfully uninstalled rspec-0.5.15
Successfully uninstalled rspec-1.1.4
Remove executables:
spec, spec_translator
in addition to the gem? [Yn] y
Removing spec
Removing spec_translator
Which leads to
Problem 5.
C:\temp\labs\08_rspec_rails\prag_hotel>rake spec
(in C:/temp/labs/08_rspec_rails/prag_hotel)
rake aborted!
no such file to load -- spec/rake/spectask
C:/temp/labs/08_rspec_rails/prag_hotel/rakefile:10
(See full trace by running task with --trace)
So, can anybody tell me if Rspec even runs on Windows any more?
--
*** E-Mail is NOT a SECURE channel ***
James B. Byrne mailto:ByrneJB at Harte-Lyne.ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3
More information about the rspec-users
mailing list