Forum: Rails-core (closed, excessive spam) Added :environment option to config.gem

Posted by José Valim (josevalim)
on 2008-05-16 19:23
(Received via mailing list)
http://rails.lighthouseapp.com/projects/8994-ruby-...

This way we can specify which gems will be loaded in each environment.
This is useful since we don't want ZenTest or ruby-debug running in
production.

Usage:

config.gem "ZenTest", :environment => :test
config.gem "ruby-debug", :environment => [:development, :test]
Posted by DHH (Guest)
on 2008-05-18 12:39
(Received via mailing list)
> This way we can specify which gems will be loaded in each environment.
> This is useful since we don't want ZenTest or ruby-debug running in
> production.
>
> Usage:
>
> config.gem "ZenTest", :environment => :test
> config.gem "ruby-debug", :environment => [:development, :test]

You can just do this in config/environments/test.rb:

  config.gem "ZenTest"

Then it's only loaded in the test environment.
This topic is locked and can not be replied to.