开发者

Rails is continually running in test mode

After upgrading to rails 2.3.5 I got things working again and the tests were passing. Then all of a sudden when I run the script/server command it now always runs in Test mode which is se开发者_Python百科en by a simple > puts RAILS_ENV

I have restarted my machine as well as run the script/server command manually setting the environment via -e, but still have no luck.

Does anyone have any idea what the cause of this would be?

** I should note that even when the RAILS_ENV constant is shows up as "test", the database config that is used is the development.

update

by adding puts RAILS_ENV statements throughout the code I can see that when I add a puts outside the Rails::Initializer.run do |config| block within the environment.rb class that at that point the RAILS_ENV becomes set to "test". Right before the end of the block it is still set to development.


The reason for the environment change was that, without thinking, I loaded the rspec gem in the development.rb file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜