Hi, Why not just specify the dependency in the correct environment file? So add config.gem 'mocha', :version => '0.9.3' to your environments/ test.rb file.
- Eloy On Feb 9, 2009, at 1:38 PM, Carlos Paramio wrote: > > Hey guys, > > I've sent a patch that might be interesting. This patch allows you to > specify a custom environment for the "gem" command on your rails app > templates. This way, you can require the gems only at the specified > environments, and not the global environment file. For example, a gem > command like this: > gem 'mocha', :env => :test > > will add the config.gem line at the file config/environments/test.rb, > instead of the global environment config/environment.rb. The default > remains to the global environment file for backward compatibility. > > A user can install the required gems for the Rails application > according to the environment that is going to be used, like: > > RAILS_ENV=test rake gems:install > > http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1918-app-templates-should-support-custom-env-files-for-the-gem-command > > What do you think? > > Carlos Paramio > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
