views:

19

answers:

1

I have already read this question : http://stackoverflow.com/questions/2715035/rails-env-vs-rails-env

I have added rails-dev-boost plugin (http://github.com/thedarkone/rails-dev-boost) and it internally uses Rails.env.development? to check and bypass its scripts if its not development. This is generally okay.

But I also use Spork Testunit (http://github.com/timcharper/spork-testunit/)to fire up a test server to quickly run tests. But this causes problem and loads up rails-dev-boost while running the tests. I checked within the rails-dev-boost plugin's init.rb and it says :

Rails.env.development? # = true
RAILS_ENV # = "test"

Why are these values different? Is there any other things that are settings these values different? Any ideas?

A: 

In the documentation:

def env
   @_env ||= ActiveSupport::StringInquirer.new(ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development")
end
marcgg