views:

123

answers:

2

I'm building my Rails template right now. Rails template is a way to generate a skeleton app.

I would like to add some gems to test.rb and development.rb, but not environment.rb. But I don't find a way to do so other than manually running Unix "echo" command to append some snippets at the end of each file.

Is there a better way?

+3  A: 

sure,

config.gem "ruby-debug", :environment => [:development, :test]

hope this helps ;

stephenmurdoch
Thanks a lot. That's what I wanted.
TK
+1  A: 

I don't have enough reputation points to comment the answer, so I complement with an answer:

with Rails 2.3.5, I had to use :env instead of :environment

config.gem "ruby-debug", :env => :test

Florent2
thanks, didn't know this...
stephenmurdoch