[rspec-users] rspec and rspec-rails install hell

David Chelimsky dchelimsky at gmail.com
Wed Jun 11 15:07:36 EDT 2008


On Jun 11, 2008, at 1:53 PM, James B. Byrne wrote:

>
> I am attending a training course covering rspec.

Cool - I'd like to hear about it.

> 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 RSpec’s 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

This was because you pulled rspec and rspec-rails at different times.  
Make sure you always update both at the same time.

>
>
> 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?
>


What a drag - sorry you went through all that. rspec_generator-0.5.15  
and rspec-0.5.15 are old, old, old and unrelated to anything useful  
today. Get rid of them.

Here's what I'd do:

Make sure you do not have any rspec related plugins in vendor/plugins  
and follow the directions from the wiki again:

cd vendor/plugins
git clone git://github.com/dchelimsky/rspec.git
git clone git://github.com/dchelimsky/rspec-rails.git
cd ../../
script/generate rspec

There's no reason that shouldn't work.

Cheers,
David



> -- 
> ***          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
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users



More information about the rspec-users mailing list