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"
可能是什么原因?谢谢。
答案 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 >