<?xml version="1.0" encoding="UTF-8"?>
<ticket>
  <assigned-user-id type="integer">7315</assigned-user-id>
  <attachments-count type="integer">0</attachments-count>
  <closed type="boolean">true</closed>
  <created-at type="datetime">2008-10-21T19:06:56+02:00</created-at>
  <creator-id type="integer">16635</creator-id>
  <milestone-due-on type="datetime">2009-03-15T00:00:00+01:00</milestone-due-on>
  <milestone-id type="integer">28208</milestone-id>
  <number type="integer">577</number>
  <permalink>rake-gems-is-broken-with-rspec-in-rails-211</permalink>
  <priority type="integer">38</priority>
  <project-id type="integer">5645</project-id>
  <raw-data type="binary" nil="true" encoding="base64"></raw-data>
  <state>resolved</state>
  <tag nil="true"></tag>
  <title>rake gems is broken with rspec in Rails 2.1.1</title>
  <updated-at type="datetime">2009-03-06T10:11:52+01:00</updated-at>
  <user-id type="integer">7315</user-id>
  <user-name>David Chelimsky</user-name>
  <creator-name>Brad Gessler</creator-name>
  <assigned-user-name>David Chelimsky</assigned-user-name>
  <url>http://rspec.lighthouseapp.com/projects/5645/tickets/577</url>
  <milestone-title>1.2.0</milestone-title>
  <original-body>When running 

rake gems

in a rails 2.1.1 project, the spec runner throws the error:

&lt;code&gt;
 $ rake gems
(in /Users/bg/Projects/xproject)
[I] hpricot &gt;= 0.6
[I] haml = 2.0.3
[I] rspec = 1.1.9
[I] rspec-rails = 1.1.9
[I] cucumber 
[I] capistrano &gt;= 2.5

I = Installed
F = Frozen
/Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec/runner/options.rb:229:in `files_to_load': File or directory not found: gems (RuntimeError)
	from /Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec/runner/options.rb:221:in `each'
	from /Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec/runner/options.rb:221:in `files_to_load'
	from /Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec/runner/options.rb:98:in `run_examples'
	from /Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec.rb:21:in `run'
	from /Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec/runner.rb:191:in `register_at_exit_hook'
	from /usr/bin/rake:19
&lt;/code&gt;

The spec runner is thinking that gems is an argument when it is not.</original-body>
  <latest-body>When running 

rake gems

in a rails 2.1.1 project, the spec runner throws the error:

&lt;code&gt;
 $ rake gems
(in /Users/bg/Projects/xproject)
[I] hpricot &gt;= 0.6
[I] haml = 2.0.3
[I] rspec = 1.1.9
[I] rspec-rails = 1.1.9
[I] cucumber 
[I] capistrano &gt;= 2.5

I = Installed
F = Frozen
/Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec/runner/options.rb:229:in `files_to_load': File or directory not found: gems (RuntimeError)
	from /Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec/runner/options.rb:221:in `each'
	from /Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec/runner/options.rb:221:in `files_to_load'
	from /Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec/runner/options.rb:98:in `run_examples'
	from /Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec.rb:21:in `run'
	from /Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec/runner.rb:191:in `register_at_exit_hook'
	from /usr/bin/rake:19
&lt;/code&gt;

The spec runner is thinking that gems is an argument when it is not.</latest-body>
  <original-body-html>&lt;div&gt;&lt;p&gt;When running&lt;/p&gt;
&lt;p&gt;rake gems&lt;/p&gt;
&lt;p&gt;in a rails 2.1.1 project, the spec runner throws the error:&lt;/p&gt;
&lt;p&gt;$ rake gems (in /Users/bg/Projects/xproject) [I] hpricot &amp;gt;=
0.6 [I] haml = 2.0.3 [I] rspec = 1.1.9 [I] rspec-rails = 1.1.9 [I]
cucumber [I] capistrano &amp;gt;= 2.5&lt;/p&gt;
&lt;p&gt;I = Installed F = Frozen
/Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec/runner/options.rb:229:in
&lt;code&gt;files_to_load': File or directory not found: gems
(RuntimeError)&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;from /Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec/runner/options.rb:221:in `each'
from /Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec/runner/options.rb:221:in `files_to_load'
from /Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec/runner/options.rb:98:in `run_examples'
from /Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec.rb:21:in `run'
from /Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec/runner.rb:191:in `register_at_exit_hook'
from /usr/bin/rake:19
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;The spec runner is thinking that gems is an argument when it is
not.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  <versions type="array">
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>When running 

rake gems

in a rails 2.1.1 project, the spec runner throws the error:

&lt;pre&gt;
 $ rake gems
(in /Users/bg/Projects/xproject)
[I] hpricot &gt;= 0.6
[I] haml = 2.0.3
[I] rspec = 1.1.9
[I] rspec-rails = 1.1.9
[I] cucumber 
[I] capistrano &gt;= 2.5

I = Installed
F = Frozen
/Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec/runner/options.rb:229:in `files_to_load': File or directory not found: gems (RuntimeError)
	from /Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec/runner/options.rb:221:in `each'
	from /Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec/runner/options.rb:221:in `files_to_load'
	from /Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec/runner/options.rb:98:in `run_examples'
	from /Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec.rb:21:in `run'
	from /Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec/runner.rb:191:in `register_at_exit_hook'
	from /usr/bin/rake:19
&lt;/pre&gt;

The spec runner is thinking that gems is an argument when it is not.</body>
      <body-html>&lt;div&gt;&lt;p&gt;When running&lt;/p&gt;
&lt;p&gt;rake gems&lt;/p&gt;
&lt;p&gt;in a rails 2.1.1 project, the spec runner throws the error:&lt;/p&gt;
&lt;pre&gt;
 $ rake gems
(in /Users/bg/Projects/xproject)
[I] hpricot &amp;gt;= 0.6
[I] haml = 2.0.3
[I] rspec = 1.1.9
[I] rspec-rails = 1.1.9
[I] cucumber
[I] capistrano &amp;gt;= 2.5

I = Installed
F = Frozen
/Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec/runner/options.rb:229:in `files_to_load': File or directory not found: gems (RuntimeError)
    from /Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec/runner/options.rb:221:in `each'
    from /Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec/runner/options.rb:221:in `files_to_load'
    from /Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec/runner/options.rb:98:in `run_examples'
    from /Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec.rb:21:in `run'
    from /Library/Ruby/Gems/1.8/gems/rspec-1.1.9/lib/spec/runner.rb:191:in `register_at_exit_hook'
    from /usr/bin/rake:19
&lt;/pre&gt;
&lt;p&gt;The spec runner is thinking that gems is an argument when it is
not.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-10-21T19:06:56+02:00</created-at>
      <creator-id type="integer">16635</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">577</number>
      <permalink>rake-gems-is-broken-with-rspec-in-rails-211</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>rake gems is broken with rspec in Rails 2.1.1</title>
      <updated-at type="datetime">2008-10-21T19:07:15+02:00</updated-at>
      <user-id type="integer">16635</user-id>
      <user-name>Brad Gessler</user-name>
      <creator-name>Brad Gessler</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/577</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>That's odd - this is something that I actually fixed in 1.1.9 and I am not having the same experience as you:

@@@
$ rake gems
(in /Users/david/projects/ruby/tmp/foo)
[I] rspec-rails = 1.1.9
[I] rspec = 1.1.9
[I] hpricot &gt;= 0.6

I = Installed
F = Frozen
@@@

What is the source of your rspec gem? Did you install it from rubyforge? Build it yourself?</body>
      <body-html>&lt;div&gt;&lt;p&gt;That's odd - this is something that I actually fixed in 1.1.9
and I am not having the same experience as you:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
$ rake gems
(in /Users/david/projects/ruby/tmp/foo)
[I] rspec-rails = 1.1.9
[I] rspec = 1.1.9
[I] hpricot &amp;gt;= 0.6

I = Installed
F = Frozen
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;What is the source of your rspec gem? Did you install it from
rubyforge? Build it yourself?&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-10-21T20:26:57+02:00</created-at>
      <creator-id type="integer">16635</creator-id>
      <diffable-attributes type="yaml">--- 
:state: new
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">577</number>
      <permalink>rake-gems-is-broken-with-rspec-in-rails-211</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>open</state>
      <tag nil="true"></tag>
      <title>rake gems is broken with rspec in Rails 2.1.1</title>
      <updated-at type="datetime">2008-10-21T20:27:01+02:00</updated-at>
      <user-id type="integer">7315</user-id>
      <user-name>David Chelimsky</user-name>
      <creator-name>Brad Gessler</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/577</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I installed it from rubyforge with a vanilla: sudo gem install rspec.
1.1.8 was doing the same thing to me as well. To make sure it wasn't 1.1.8
or anything else, I uninstalled all of my old rspec and rspec-rails gems and
installed 1.1.9; which caused the same problems.

On Tue, Oct 21, 2008 at 1:27 PM, Lighthouse &lt;support@lighthouseapp.com&gt;wrote:</body>
      <body-html>&lt;div&gt;&lt;p&gt;I installed it from rubyforge with a vanilla: sudo gem install
rspec. 1.1.8 was doing the same thing to me as well. To make sure
it wasn't 1.1.8 or anything else, I uninstalled all of my old rspec
and rspec-rails gems and installed 1.1.9; which caused the same
problems.&lt;/p&gt;
&lt;p&gt;On Tue, Oct 21, 2008 at 1:27 PM, Lighthouse &lt;a href=&quot;mailto:support@lighthouseapp.com&quot;&gt;support@lighthouseapp.com&lt;/a&gt;wrote:&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-10-21T20:35:07+02:00</created-at>
      <creator-id type="integer">16635</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">577</number>
      <permalink>rake-gems-is-broken-with-rspec-in-rails-211</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>open</state>
      <tag nil="true"></tag>
      <title>rake gems is broken with rspec in Rails 2.1.1</title>
      <updated-at type="datetime">2008-10-21T20:35:10+02:00</updated-at>
      <user-id type="integer">16635</user-id>
      <user-name>Brad Gessler</user-name>
      <creator-name>Brad Gessler</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/577</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>would you mind posting all the lines that have config.gem so I can duplicate that locally?</body>
      <body-html>&lt;div&gt;&lt;p&gt;would you mind posting all the lines that have config.gem so I
can duplicate that locally?&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-10-21T20:36:34+02:00</created-at>
      <creator-id type="integer">16635</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">577</number>
      <permalink>rake-gems-is-broken-with-rspec-in-rails-211</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>open</state>
      <tag nil="true"></tag>
      <title>rake gems is broken with rspec in Rails 2.1.1</title>
      <updated-at type="datetime">2008-10-21T20:36:36+02:00</updated-at>
      <user-id type="integer">7315</user-id>
      <user-name>David Chelimsky</user-name>
      <creator-name>Brad Gessler</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/577</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Sure, not a problem. Here is everything I have configured as a gem:

&lt;pre&gt;
config.gem &quot;hpricot&quot;, :version =&gt; '&gt;= 0.6', :source =&gt; &quot;http://code.whytheluckystiff.net&quot;
config.gem &quot;haml&quot;,  :version =&gt; '2.0.3'
config.gem 'rspec', :lib =&gt; 'spec', :version =&gt; '1.1.9'
config.gem 'rspec-rails', :lib =&gt; 'spec/rails', :version =&gt; '1.1.9'
config.gem &quot;cucumber&quot;
&lt;/pre&gt;</body>
      <body-html>&lt;div&gt;&lt;p&gt;Sure, not a problem. Here is everything I have configured as a
gem:&lt;/p&gt;
&lt;pre&gt;
config.gem &quot;hpricot&quot;, :version =&amp;gt; '&amp;gt;= 0.6', :source =&amp;gt; &quot;http://code.whytheluckystiff.net&quot;
config.gem &quot;haml&quot;,  :version =&amp;gt; '2.0.3'
config.gem 'rspec', :lib =&amp;gt; 'spec', :version =&amp;gt; '1.1.9'
config.gem 'rspec-rails', :lib =&amp;gt; 'spec/rails', :version =&amp;gt; '1.1.9'
config.gem &quot;cucumber&quot;
&lt;/pre&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-10-21T20:42:08+02:00</created-at>
      <creator-id type="integer">16635</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">577</number>
      <permalink>rake-gems-is-broken-with-rspec-in-rails-211</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>open</state>
      <tag nil="true"></tag>
      <title>rake gems is broken with rspec in Rails 2.1.1</title>
      <updated-at type="datetime">2008-10-21T20:42:12+02:00</updated-at>
      <user-id type="integer">16635</user-id>
      <user-name>Brad Gessler</user-name>
      <creator-name>Brad Gessler</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/577</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>WOW - I've got a workaround for you - swap the two rspec lines (rspec-rails first) and the problem goes away. Don't know why yet, but at least you can work :)

I'll follow up when I understand.

Cheers,
David</body>
      <body-html>&lt;div&gt;&lt;p&gt;WOW - I've got a workaround for you - swap the two rspec lines
(rspec-rails first) and the problem goes away. Don't know why yet,
but at least you can work :)&lt;/p&gt;
&lt;p&gt;I'll follow up when I understand.&lt;/p&gt;
&lt;p&gt;Cheers, David&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-10-21T20:44:32+02:00</created-at>
      <creator-id type="integer">16635</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">577</number>
      <permalink>rake-gems-is-broken-with-rspec-in-rails-211</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>open</state>
      <tag nil="true"></tag>
      <title>rake gems is broken with rspec in Rails 2.1.1</title>
      <updated-at type="datetime">2008-10-21T20:44:35+02:00</updated-at>
      <user-id type="integer">7315</user-id>
      <user-name>David Chelimsky</user-name>
      <creator-name>Brad Gessler</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/577</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Wow! So subtle.

Thanks for looking into this and being so fast with the tickets (and rspec for that matter!)</body>
      <body-html>&lt;div&gt;&lt;p&gt;Wow! So subtle.&lt;/p&gt;
&lt;p&gt;Thanks for looking into this and being so fast with the tickets
(and rspec for that matter!)&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-10-21T20:46:18+02:00</created-at>
      <creator-id type="integer">16635</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">577</number>
      <permalink>rake-gems-is-broken-with-rspec-in-rails-211</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>open</state>
      <tag nil="true"></tag>
      <title>rake gems is broken with rspec in Rails 2.1.1</title>
      <updated-at type="datetime">2008-10-21T20:46:21+02:00</updated-at>
      <user-id type="integer">16635</user-id>
      <user-name>Brad Gessler</user-name>
      <creator-name>Brad Gessler</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/577</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>You're welcome! I wish I could be as responsive all the time. Today I'm more sensitive than normal since I just did the release last night :)

Question - what do you think about only putting rspec-rails as a gem dependency of the rails project, seeing as rspec-rails depends on rspec and installing rspec-rails will implicitly install rspec as well (assuming default behaviour of rubygems &gt;= 1.2)?

Cheers,
David</body>
      <body-html>&lt;div&gt;&lt;p&gt;You're welcome! I wish I could be as responsive all the time.
Today I'm more sensitive than normal since I just did the release
last night :)&lt;/p&gt;
&lt;p&gt;Question - what do you think about only putting rspec-rails as a
gem dependency of the rails project, seeing as rspec-rails depends
on rspec and installing rspec-rails will implicitly install rspec
as well (assuming default behaviour of rubygems &amp;gt;= 1.2)?&lt;/p&gt;
&lt;p&gt;Cheers, David&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-10-21T20:48:16+02:00</created-at>
      <creator-id type="integer">16635</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">577</number>
      <permalink>rake-gems-is-broken-with-rspec-in-rails-211</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>open</state>
      <tag nil="true"></tag>
      <title>rake gems is broken with rspec in Rails 2.1.1</title>
      <updated-at type="datetime">2008-10-21T20:48:21+02:00</updated-at>
      <user-id type="integer">7315</user-id>
      <user-name>David Chelimsky</user-name>
      <creator-name>Brad Gessler</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/577</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>That makes sense; I can't really see any issue with that given my needs.

I could also see a similar pattern working for other types of frameworks, like a gem called rspec-merb or rspec-framework_name that bootstraps rspec to the respective framework.</body>
      <body-html>&lt;div&gt;&lt;p&gt;That makes sense; I can't really see any issue with that given
my needs.&lt;/p&gt;
&lt;p&gt;I could also see a similar pattern working for other types of
frameworks, like a gem called rspec-merb or rspec-framework_name
that bootstraps rspec to the respective framework.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-10-21T20:55:42+02:00</created-at>
      <creator-id type="integer">16635</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">577</number>
      <permalink>rake-gems-is-broken-with-rspec-in-rails-211</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>open</state>
      <tag nil="true"></tag>
      <title>rake gems is broken with rspec in Rails 2.1.1</title>
      <updated-at type="datetime">2008-10-21T20:55:45+02:00</updated-at>
      <user-id type="integer">16635</user-id>
      <user-name>Brad Gessler</user-name>
      <creator-name>Brad Gessler</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/577</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>This:

@@@
  config.gem &quot;haml&quot;
  config.gem &quot;hoe&quot;
  config.gem &quot;rubyforge&quot;
  config.gem &quot;term-ansicolor&quot;
  config.gem &quot;ZenTest&quot;
  config.gem &quot;diff-lcs&quot;,      :lib =&gt; &quot;lcs&quot;
  config.gem &quot;rspec-rails&quot;,   :lib =&gt; &quot;spec/rails&quot;, :version =&gt; &quot;1.1.12&quot;
  config.gem &quot;rspec&quot;,         :lib =&gt; &quot;spec&quot;,       :version =&gt; &quot;1.1.12&quot;
  config.gem &quot;cucumber&quot; 
@@@

Produces:

@@@
rake aborted!
You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]
@@@

If I remove rspec-rails, the problem goes away.</body>
      <body-html>&lt;div&gt;&lt;p&gt;This:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
  config.gem &amp;quot;haml&amp;quot;
  config.gem &amp;quot;hoe&amp;quot;
  config.gem &amp;quot;rubyforge&amp;quot;
  config.gem &amp;quot;term-ansicolor&amp;quot;
  config.gem &amp;quot;ZenTest&amp;quot;
  config.gem &amp;quot;diff-lcs&amp;quot;,      :lib =&amp;gt; &amp;quot;lcs&amp;quot;
  config.gem &amp;quot;rspec-rails&amp;quot;,   :lib =&amp;gt; &amp;quot;spec/rails&amp;quot;, :version =&amp;gt; &amp;quot;1.1.12&amp;quot;
  config.gem &amp;quot;rspec&amp;quot;,         :lib =&amp;gt; &amp;quot;spec&amp;quot;,       :version =&amp;gt; &amp;quot;1.1.12&amp;quot;
  config.gem &amp;quot;cucumber&amp;quot; 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Produces:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
rake aborted!
You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If I remove rspec-rails, the problem goes away.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-01-16T21:20:07+01:00</created-at>
      <creator-id type="integer">16635</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">577</number>
      <permalink>rake-gems-is-broken-with-rspec-in-rails-211</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>open</state>
      <tag nil="true"></tag>
      <title>rake gems is broken with rspec in Rails 2.1.1</title>
      <updated-at type="datetime">2009-01-16T21:20:12+01:00</updated-at>
      <user-id type="integer">29709</user-id>
      <user-name>Martin Streicher</user-name>
      <creator-name>Brad Gessler</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/577</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Martin - please try these two things and let me know if either solves your problem:

1. move those statements to config/environments/test.rb

2. use lib =&gt; false instead of lib =&gt; 'spec' or 'spec/rails'</body>
      <body-html>&lt;div&gt;&lt;p&gt;Martin - please try these two things and let me know if either
solves your problem:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;move those statements to config/environments/test.rb&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;use lib =&amp;gt; false instead of lib =&amp;gt; 'spec' or
'spec/rails'&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-01-16T21:25:09+01:00</created-at>
      <creator-id type="integer">16635</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">577</number>
      <permalink>rake-gems-is-broken-with-rspec-in-rails-211</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>open</state>
      <tag nil="true"></tag>
      <title>rake gems is broken with rspec in Rails 2.1.1</title>
      <updated-at type="datetime">2009-01-16T21:25:10+01:00</updated-at>
      <user-id type="integer">7315</user-id>
      <user-name>David Chelimsky</user-name>
      <creator-name>Brad Gessler</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/577</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>David, I think that changed the situation. 

@@@
rake gems
(in /Users/supergiantrobot/Projects/TBAR/tbar/tbar)
 - [F] haml 

I = Installed
F = Frozen
R = Framework (loaded before rails starts)
@@@

Seems to be better. I was also able to ruby script/generate rspec.</body>
      <body-html>&lt;div&gt;&lt;p&gt;David, I think that changed the situation.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
rake gems
(in /Users/supergiantrobot/Projects/TBAR/tbar/tbar)
 - [F] haml 

I = Installed
F = Frozen
R = Framework (loaded before rails starts)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Seems to be better. I was also able to ruby script/generate
rspec.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-01-16T23:51:10+01:00</created-at>
      <creator-id type="integer">16635</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">577</number>
      <permalink>rake-gems-is-broken-with-rspec-in-rails-211</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>open</state>
      <tag nil="true"></tag>
      <title>rake gems is broken with rspec in Rails 2.1.1</title>
      <updated-at type="datetime">2009-01-16T23:51:15+01:00</updated-at>
      <user-id type="integer">29709</user-id>
      <user-name>Martin Streicher</user-name>
      <creator-name>Brad Gessler</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/577</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I take that back. 

@@@
config.gem &quot;hoe&quot;
config.gem &quot;rubyforge&quot;
config.gem &quot;diff-lcs&quot;,        :lib =&gt; &quot;diff/lcs&quot;
config.gem &quot;term-ansicolor&quot;,  :lib =&gt; &quot;term/ansicolor&quot;
config.gem &quot;ZenTest&quot;
config.gem &quot;rspec-rails&quot;,     :lib =&gt; false, :version =&gt; &quot;1.1.12&quot;
config.gem &quot;rspec&quot;,           :lib =&gt; false,       :version =&gt; &quot;1.1.12&quot;
config.gem &quot;cucumber&quot; 
@@@

@@@
RAILS_ENV=test rake gems
@@@

still crashes.</body>
      <body-html>&lt;div&gt;&lt;p&gt;I take that back.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
config.gem &amp;quot;hoe&amp;quot;
config.gem &amp;quot;rubyforge&amp;quot;
config.gem &amp;quot;diff-lcs&amp;quot;,        :lib =&amp;gt; &amp;quot;diff/lcs&amp;quot;
config.gem &amp;quot;term-ansicolor&amp;quot;,  :lib =&amp;gt; &amp;quot;term/ansicolor&amp;quot;
config.gem &amp;quot;ZenTest&amp;quot;
config.gem &amp;quot;rspec-rails&amp;quot;,     :lib =&amp;gt; false, :version =&amp;gt; &amp;quot;1.1.12&amp;quot;
config.gem &amp;quot;rspec&amp;quot;,           :lib =&amp;gt; false,       :version =&amp;gt; &amp;quot;1.1.12&amp;quot;
config.gem &amp;quot;cucumber&amp;quot; 
&lt;/code&gt;&lt;/pre&gt;


&lt;pre&gt;&lt;code&gt;
RAILS_ENV=test rake gems
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;still crashes.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-01-16T23:53:58+01:00</created-at>
      <creator-id type="integer">16635</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">577</number>
      <permalink>rake-gems-is-broken-with-rspec-in-rails-211</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>open</state>
      <tag nil="true"></tag>
      <title>rake gems is broken with rspec in Rails 2.1.1</title>
      <updated-at type="datetime">2009-01-16T23:54:02+01:00</updated-at>
      <user-id type="integer">29709</user-id>
      <user-name>Martin Streicher</user-name>
      <creator-name>Brad Gessler</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/577</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I'm getting a similar failing message with cruisecontrol.rb. I get the same no such file to load, except it's now not finding cc:build.

Ruby 1.8.7p72
Rails 2.2.2
RSpec/RSpecRails 1.1.12

/usr/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/spec/runner/options.rb:240:in `files_to_load': File or directory not found: cc:build (RuntimeError) from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/spec/runner/options.rb:232:in `each' from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/spec/runner/options.rb:232:in `files_to_load' from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/spec/runner/options.rb:94:in `run_examples' from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/spec/runner.rb:78:in `run' from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/spec/runner.rb:48:in `register_at_exit_hook' from -e:1</body>
      <body-html>&lt;div&gt;&lt;p&gt;I'm getting a similar failing message with cruisecontrol.rb. I
get the same no such file to load, except it's now not finding
cc:build.&lt;/p&gt;
&lt;p&gt;Ruby 1.8.7p72 Rails 2.2.2 RSpec/RSpecRails 1.1.12&lt;/p&gt;
&lt;p&gt;
/usr/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/spec/runner/options.rb:240:in
&lt;code&gt;files_to_load': File or directory not found: cc:build
(RuntimeError) from
/usr/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/spec/runner/options.rb:232:in&lt;/code&gt;each'
from
/usr/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/spec/runner/options.rb:232:in
&lt;code&gt;files_to_load' from
/usr/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/spec/runner/options.rb:94:in&lt;/code&gt;run_examples'
from
/usr/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/spec/runner.rb:78:in
&lt;code&gt;run' from
/usr/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/spec/runner.rb:48:in&lt;/code&gt;register_at_exit_hook'
from -e:1&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-02-24T02:46:48+01:00</created-at>
      <creator-id type="integer">16635</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">577</number>
      <permalink>rake-gems-is-broken-with-rspec-in-rails-211</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>open</state>
      <tag nil="true"></tag>
      <title>rake gems is broken with rspec in Rails 2.1.1</title>
      <updated-at type="datetime">2009-02-24T02:46:49+01:00</updated-at>
      <user-id type="integer">19734</user-id>
      <user-name>Andrew Selder</user-name>
      <creator-name>Brad Gessler</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/577</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>This is fixed in the latest development gems from github, and will be fixed in the 1.2 release.

&quot;http://wiki.github.com/dchelimsky/rspec/rails-with-rspec-gems&quot;:http://wiki.github.com/dchelimsky/rspec/rails-with-rspec-gems</body>
      <body-html>&lt;div&gt;&lt;p&gt;This is fixed in the latest development gems from github, and
will be fixed in the 1.2 release.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://wiki.github.com/dchelimsky/rspec/rails-with-rspec-gems&quot;&gt;http://wiki.github.com/dchelimsky/rspec/rails-with-rspec-gems&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-02-24T03:27:03+01:00</created-at>
      <creator-id type="integer">16635</creator-id>
      <diffable-attributes type="yaml">--- 
:state: open
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">577</number>
      <permalink>rake-gems-is-broken-with-rspec-in-rails-211</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>rake gems is broken with rspec in Rails 2.1.1</title>
      <updated-at type="datetime">2009-02-24T03:28:41+01:00</updated-at>
      <user-id type="integer">7315</user-id>
      <user-name>David Chelimsky</user-name>
      <creator-name>Brad Gessler</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/577</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">7315</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body></body>
      <body-html></body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-03-06T10:11:48+01:00</created-at>
      <creator-id type="integer">16635</creator-id>
      <diffable-attributes type="yaml">--- 
:milestone: 
</diffable-attributes>
      <milestone-id type="integer">28208</milestone-id>
      <number type="integer">577</number>
      <permalink>rake-gems-is-broken-with-rspec-in-rails-211</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">5645</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>rake gems is broken with rspec in Rails 2.1.1</title>
      <updated-at type="datetime">2009-03-06T10:11:52+01:00</updated-at>
      <user-id type="integer">7315</user-id>
      <user-name>David Chelimsky</user-name>
      <creator-name>Brad Gessler</creator-name>
      <assigned-user-name>David Chelimsky</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/5645/tickets/577</url>
      <milestone-title>1.2.0</milestone-title>
    </version>
  </versions>
</ticket>
