# Rspec and rspec-rails install hell

**URL:** <https://www.ruby-forum.com/t/rspec-and-rspec-rails-install-hell/140200>\
**Category:** RSpec\
**Created:** [June 11, 2008, 8:54pm UTC](https://www.ruby-forum.com/t/rspec-and-rspec-rails-install-hell/140200 "2008-06-11T20:54:24Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [June 11, 2008, 8:54pm UTC](https://www.ruby-forum.com/t/rspec-and-rspec-rails-install-hell/140200/1 "2008-06-11T20:54:24Z")

</div>

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)

> **[GitHub - dchelimsky/rspec: Behaviour Driven Development framework for Ruby](https://github.com/dchelimsky/rspec)**
>
> Behaviour Driven Development framework for Ruby. Contribute to dchelimsky/rspec development by creating an account on GitHub.

> **[Home](https://github.com/dchelimsky/rspec-rails/wiki)**
>
> RSpec extension library for Ruby on Rails. Contribute to dchelimsky/rspec-rails development by creating an account on GitHub.

BUT! If one tries to install via git-clone form this repository one sees  
this!

C:\temp\>git clone [GitHub - dchelimsky/rspec: Behaviour Driven Development framework for Ruby](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

Make sure your RSpec on Rails plugin is compatible with your RSpec gem.  
See [http://rspec.rubyforge.org/documentation/rails/install.html](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:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Harte & Lyne Limited [http://www.harte-lyne.ca](http://www.harte-lyne.ca)  
9 Brockley Drive vox: +1 905 561 1241  
Hamilton, Ontario fax: +1 905 561 0757  
Canada L8E 3C3

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [June 11, 2008, 9:08pm UTC](https://www.ruby-forum.com/t/rspec-and-rspec-rails-install-hell/140200/2 "2008-06-11T21:08:36Z")

</div>

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.

> Install RSpec’s edge for rails \<= 2.0.2
> 
> Successfully installed rspec\_generator-0.5.15  
> installed and the latest from github in my project, which is  
> /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.

> the plugins this leaves me somewhat nonplussed. However, sycn
> 
> in addition to the gem? [Yn] y  
> 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

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [June 11, 2008, 9:11pm UTC](https://www.ruby-forum.com/t/rspec-and-rspec-rails-install-hell/140200/3 "2008-06-11T21:11:34Z")

</div>

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

> Problem 1.
> 
> If one goes to the rspec.info website and links through to download  
> one sees:
> 
> > From source (at github)
> 
> [GitHub - dchelimsky/rspec: Behaviour Driven Development framework for Ruby](http://github.com/dchelimsky/rspec/wikis/home)  
> [Home · dchelimsky/rspec-rails Wiki · GitHub](http://github.com/dchelimsky/rspec-rails/wikis/home)

Ah - doco problem - that was not intended to be download links, but  
information links. I’ll make that more clear.

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [June 14, 2008, 11:30am UTC](https://www.ruby-forum.com/t/rspec-and-rspec-rails-install-hell/140200/4 "2008-06-14T11:30:08Z")

</div>

> Message: 1  
> Date: Wed, 11 Jun 2008 14:07:36 -0500  
> From: David C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

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

This is what I am experiencing now:

C:\temp\labs\08\_rspec\_rails\prag\_hotel\>gem list | grep rspec\*  
C:\temp\labs\08\_rspec\_rails\prag\_hotel\>  
C:\temp\labs\08\_rspec\_rails\prag\_hotel\>  
C:\temp\labs\08\_rspec\_rails\prag\_hotel\>git clone  
git://github.com/dchelimsky/rsp  
ec.git vendor/plugins/rspec  
Initialized empty Git repository in  
/cygdrive/c/temp/labs/08\_rspec\_rails/prag\_ho  
tel/vendor/plugins/rspec/.git/  
remote: Counting objects: 46856, done.  
remote: Compressing objects: 100% (10654/10654), done.  
remote: Total 46856 (delta 33558), reused 46856 (delta 33558)  
Receiving objects: 100% (46856/46856), 6.00 MiB | 56 KiB/s, done.  
Resolving deltas: 100% (33558/33558), done.

C:\temp\labs\08\_rspec\_rails\prag\_hotel\>git clone  
git://github.com/dchelimsky/rsp  
ec-rails.git vendor/plugins/rspec-rails  
Initialized empty Git repository in  
/cygdrive/c/temp/labs/08\_rspec\_rails/prag\_ho  
tel/vendor/plugins/rspec-rails/.git/  
remote: Counting objects: 46582, done.  
remote: Compressing objects: 100% (10669/10669), done.  
remote: Total 46582 (delta 33273), reused 46582 (delta 33273)  
Receiving objects: 100% (46582/46582), 5.95 MiB | 69 KiB/s, done.  
Resolving deltas: 100% (33273/33273), done.

C:\temp\labs\08\_rspec\_rails\prag\_hotel\>script/generate rspec  
‘script’ is not recognized as an internal or external command,  
operable program or batch file.

C:\temp\labs\08\_rspec\_rails\prag\_hotel\>ruby script/generate rspec  
exists spec  
identical spec/spec\_helper.rb  
identical spec/spec.opts  
identical spec/rcov.opts  
identical script/spec\_server  
identical script/spec  
exists stories  
identical stories/all.rb  
identical stories/helper.rb

C:\temp\labs\08\_rspec\_rails\prag\_hotel\>  
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)

C:\temp\labs\08\_rspec\_rails\prag\_hotel\>gem install rspec  
Bulk updating Gem source index for: [http://gems.rubyforge.org/](http://gems.rubyforge.org/)  
Successfully installed rspec-1.1.4  
1 gem installed  
Installing ri documentation for rspec-1.1.4…  
Installing RDoc documentation for rspec-1.1.4…

C:\temp\labs\08\_rspec\_rails\prag\_hotel\>rake spec  
(in /cygdrive/c/temp/labs/08\_rspec\_rails/prag\_hotel)  
/cygdrive/c/temp/labs/08\_rspec\_rails/prag\_hotel/vendor/plugins/rspec-rails/lib/s  
pec/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](http://rspec.rubyforge.org/documentation/rails/install.html) for  
details.  
############################################################################

C:\temp\labs\08\_rspec\_rails\prag\_hotel\>gem uninstall rspec  
Successfully uninstalled rspec-1.1.4  
Remove executables:  
spec, spec\_translator

in addition to the gem? [Yn] n  
Executables and scripts will remain installed.

C:\temp\labs\08\_rspec\_rails\prag\_hotel\>rake spec  
(in /cygdrive/c/temp/labs/08\_rspec\_rails/prag\_hotel)  
rake aborted!  
no such file to load – spec/rake/spectask  
/cygdrive/c/temp/labs/08\_rspec\_rails/prag\_hotel/rakefile:10  
(See full trace by running task with --trace)

Here is the problem. If RSpec gem is not installed then I get the  
rspec-rails  
/ rspec version mismatch. If I remove the RSpec gem then the rake tasks  
will  
not run.

Suggestions welcome.

–  
\*\*\* E-Mail is NOT a SECURE channel \*\*\*  
James B. Byrne [mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Harte & Lyne Limited [http://www.harte-lyne.ca](http://www.harte-lyne.ca)  
9 Brockley Drive vox: +1 905 561 1241  
Hamilton, Ontario fax: +1 905 561 0757  
Canada L8E 3C3

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [June 14, 2008, 11:50am UTC](https://www.ruby-forum.com/t/rspec-and-rspec-rails-install-hell/140200/5 "2008-06-14T11:50:43Z")

</div>

On Jun 13, 2008, at 11:27 AM, James B. Byrne wrote:

> > script/generate rspec  
> > ec.git vendor/plugins/rspec  
> > git://github.com/dchelimsky/rsp  
> > C:\temp\labs\08\_rspec\_rails\prag\_hotel\>script/generate rspec  
> > ‘script’ is not recognized as an internal or external command,  
> > operable program or batch file.

That one is a windows problem - guess you gotta use the ruby command.

> C:\temp\labs\08\_rspec\_rails\prag\_hotel\>  
> 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)
> 
> C:\temp\labs\08\_rspec\_rails\prag\_hotel\>gem install rspec

> pec/rails/version.rb:11: (RuntimeError)  
> ############################################################################  
> (in /cygdrive/c/temp/labs/08\_rspec\_rails/prag\_hotel)  
> not run.  
> For some reason rails is not finding rspec in vendor/plugins. Don’t  
> know why.

To get things running, you can just go into rspec-rails/lib/spec/rails/  
version.rb and comment the code that’s complaining about the version  
mismatch. The risk is fairly low at this point that you’re going to  
have any trouble.

If you don’t want to do that - try checking out the 1.1.4 version of  
spec-rails, so starting clean (no rspec anywhere) you would do this:

gem install rspec  
cd vendor/plugins  
git clone git://github.com/dchelimsky/rspec-rails.git  
cd rspec-rails  
git checkout 1.1.4

Now you should have the same versions of the rspec gem and rspec-rails  
plugin.

Let us know if that works.

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [September 23, 2008, 9:46pm UTC](https://www.ruby-forum.com/t/rspec-and-rspec-rails-install-hell/140200/6 "2008-09-23T21:46:26Z")

</div>

Hi,

I updated my rspec and rspec-rails plugins from 1.1.3 to 1.1.4

## Doing script/generate rspec, seemed to have worked, but now when I want to run rake spec, I get the following error message:

/usr/local/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`gem\_original\_require’: no such file to load – spec/rails  
(MissingSourceFile)

Indeed rails is missing from the spec/ folder. What happened? If I copy  
it by hand will it work?

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [September 23, 2008, 10:15pm UTC](https://www.ruby-forum.com/t/rspec-and-rspec-rails-install-hell/140200/7 "2008-09-23T22:15:07Z")

</div>

I found where the bug was coming from:

I initialize my plugins using:

For my default config:  
config.plugins = [:some\_plugin]

For my development environment:  
config.plugins = [:all]

For some strange reason, rspec doesn’t like this statement, so when I  
remove them all, the it now works.

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [September 23, 2008, 10:07pm UTC](https://www.ruby-forum.com/t/rspec-and-rspec-rails-install-hell/140200/8 "2008-09-23T22:07:27Z")

</div>

Argh, installing rspec in a fresh new rails app worked. I guess  
something got borked in the upgrade process.

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [September 24, 2008, 12:03am UTC](https://www.ruby-forum.com/t/rspec-and-rspec-rails-install-hell/140200/9 "2008-09-24T00:03:32Z")

</div>

I have one last problem. Now autotest only executes tests that sit in  
test/ folder, and doesn’t seem to run the specs.

How do I correct that?

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [September 23, 2008, 10:29pm UTC](https://www.ruby-forum.com/t/rspec-and-rspec-rails-install-hell/140200/10 "2008-09-23T22:29:18Z")

</div>

## Is it normal behavior that when a test fails, I get an error message at the end such as:

## rake aborted! Command /usr/local/ruby/bin/ruby -I"…

When all the tests pass, I don’t get any error message though. But  
having this error message when a test fails makes me feel that there was  
an error in the ruby script.

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [September 24, 2008, 9:03am UTC](https://www.ruby-forum.com/t/rspec-and-rspec-rails-install-hell/140200/11 "2008-09-24T09:03:06Z")

</div>

Thank you very much for ./script/autospec, it works perfectly now.

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [September 24, 2008, 1:20am UTC](https://www.ruby-forum.com/t/rspec-and-rspec-rails-install-hell/140200/12 "2008-09-24T01:20:33Z")

</div>

that’s actually good - mine is broken an will only run specs.

use script/autospec to run specs.

now you can run both at once!

On 23 Sep 2008, at 23:03, Fernando P. wrote:

> I have one last problem. Now autotest only executes tests that sit in  
> test/ folder, and doesn’t seem to run the specs.
> 
> ## How do I correct that?
> 
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> * * *
> 
> rspec-users mailing list  
> removed\_email\_address@domain.invalid  
> [http://rubyforge.org/mailman/listinfo/rspec-users](http://rubyforge.org/mailman/listinfo/rspec-users)

## cheers, Matt

[http://blog.mattwynne.net](http://blog.mattwynne.net)

> **[Find the Best Concerts Near You, Tour Dates & Tickets Worldwide | Songkick](https://www.songkick.com/)**
>
> Find live music near you, track your favorite artists, get instant concert alerts and buy tickets for all the best upcoming concerts.

In case you wondered: The opinions expressed in this email are my own  
and do not necessarily reflect the views of any former, current or  
future employers of mine.
