rails环境在开发模式下启动时显示测试

时间:2015-06-03 12:28:03

标签: ruby-on-rails

 rails s
=> Booting Thin
=> Rails 4.1.8 application starting in development on http://0.0.0.0:3000

使用pry进行调试:

[1] pry(#<ProductsController>)> Rails.env
=> "test"

可能是什么原因?谢谢。

1 个答案:

答案 0 :(得分:0)

试试这个

 $ rails c -e development 
   Loading development environment (Rails 4.0.3)
   2.0.0-p481 :001 > Rails.env
   => "development" 
   2.0.0-p481 :002 >