[rspec-users] Vendoring rspec 1.1.12 as a gem
pergesu at gmail.com
Sat Jan 17 19:27:21 EST 2009
On Sat, Jan 17, 2009 at 11:58 AM, David Chelimsky <dchelimsky at gmail.com> wrote:
> On Sat, Jan 17, 2009 at 1:42 PM, David Chelimsky <dchelimsky at gmail.com> wrote:
>> On Sat, Jan 17, 2009 at 11:06 AM, Wincent Colaiuta <win at wincent.com> wrote:
>>> Hi folks,
>>> Up until now I've always used RSpec as a plug-in in my vendor dir, but
>>> seeing as the gem is the endorsed way to install I decided I would try the
>>> gem this time (still vendoring it though because I vendor everything).
>>> Anyone had any luck doing that?
>>> Here's what I did. First, to get rspec and rspec-rails on the system:
>>> sudo gem install rspec-rails
>>> Then add a couple lines to my config/environments/test.rb file:
>>> config.gem 'rspec', :version => '1.1.12'
>>> config.gem 'rspec-rails', :version => '1.1.12'
>> I just posted about this on the wiki:
>> Please check that out and let us know if you have any trouble.
> Actually, that doesn't address vendoring, just configuring. I have not
> been able to get rspec vendored successfully yet. I wonder if anybody
> has any ideas about the following:
> Right now, if you do this in config/environments/test.rb:
> config.gem "rspec", :lib => false, :version => "1.1.12"
> config.gem "rspec-rails", :lib => false, :version => "1.1.12"
> and then type this command:
> RAILS_ENV=test rake gems
> you get this output:
> $ RAILS_ENV=test rake gems
> (in /Users/david/projects/ruby/tmp/foo)
> - [R] rspec = 1.1.12
> - [I] rspec-rails = 1.1.12
> - [I] rspec = 1.1.12
> - [ ] cucumber >= 0.1.13
> - [ ] hoe >= 1.8.2
> - [ ] term-ansicolor >= 1.0.3
> - [ ] treetop >= 1.2.4
> - [ ] diff-lcs >= 1.1.2
> - [ ] polyglot
> - [ ] rubyforge >= 1.0.1
> - [I] rake = 0.8.3
> I = Installed
> F = Frozen
> R = Framework (loaded before rails starts)
> That lists all of rspec's dev dependencies (indented) - but the thing
> that I don't understand yet is the [R] indication that rspec gets
> assigned. The result is that if you try to vendor rspec and
> rspec-rails, it only vendors rspec-rails, not rspec.
> Anybody have a grasp on why this is happening? I'd love to get this
> resolved before the next release.
Personally I think config.gem is terrible. Just unpack the gem in
vendor and then $:.unshift the lib path in test.rb or better yet,
More information about the rspec-users