Forum: RSpec Rails config.gem and rspec, rspec-rails

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F86901feca747abbb5c6c020362ef2e7?d=identicon&s=25 Zach Dennis (zdennis)
on 2008-10-14 06:48
(Received via mailing list)
In #rspec the instructions for installing rspec and rspec-rails on a
Rails project. Specifically talking about the following line from
http://github.com/dchelimsky/rspec-rails/wikis/home

  config.gem "rspec-rails", :lib => "spec"

I think this should be updated to not instruct people to do this.
Rails config.gem will *load* all configured gems in all environments
which isn't what I thikn people expect. Simply having people move
these config.gem statements into the appropriate environment file also
doesn't work quite as expected (at least not with the rake tasks that
surround gem usage in Rails).

If folks use the gem versions I think the wiki should advise them to
run "gem unpack rspec rspec-rails" inside of vendor/gems.

Thoughts?

--
Zach Dennis
http://www.continuousthinking.com
http://www.mutuallyhuman.com
5d38ab152e1e3e219512a9859fcd93af?d=identicon&s=25 David Chelimsky (Guest)
on 2008-10-14 07:26
(Received via mailing list)
On Tue, Oct 14, 2008 at 2:48 AM, Zach Dennis <zach.dennis@gmail.com>
wrote:
> doesn't work quite as expected (at least not with the rake tasks that
> surround gem usage in Rails).
>
> If folks use the gem versions I think the wiki should advise them to
> run "gem unpack rspec rspec-rails" inside of vendor/gems.

Actually, I've just been using the gems without any reference to them
in the app configuration. Just 'gem install rspec-rails',
'script/generate rspec', and go.

So reflected on the wiki.

Thanks Zach,
David
F1e1789ff9e7fc3032fa6cf15382a1e8?d=identicon&s=25 Juanma Cervera (jmcervera)
on 2008-10-15 10:52
Zach Dennis wrote:
> In #rspec the instructions for installing rspec and rspec-rails on a
> Rails project. Specifically talking about the following line from
> http://github.com/dchelimsky/rspec-rails/wikis/home
>
>   config.gem "rspec-rails", :lib => "spec"
>
> I think this should be updated to not instruct people to do this.
> Rails config.gem will *load* all configured gems in all environments
> which isn't what I thikn people expect. Simply having people move
> these config.gem statements into the appropriate environment file also
> doesn't work quite as expected (at least not with the rake tasks that
> surround gem usage in Rails).
>
> If folks use the gem versions I think the wiki should advise them to
> run "gem unpack rspec rspec-rails" inside of vendor/gems.
>

Besides, I get this warning when that line in environment.rb

  irb: warn: can't alias context from irb_context

I don't understand the implications, only telling this because may be
useful for someone.
This topic is locked and can not be replied to.