0
rails s
=> Booting Thin
=> Rails 4.1.8 application starting in development on http://0.0.0.0:3000
[1] pry(#<ProductsController>)> Rails.env
=> "test"
可能是什麼原因?謝謝。
rails s
=> Booting Thin
=> Rails 4.1.8 application starting in development on http://0.0.0.0:3000
[1] pry(#<ProductsController>)> Rails.env
=> "test"
可能是什麼原因?謝謝。
試試這個
$ rails c -e development
Loading development environment (Rails 4.0.3)
2.0.0-p481 :001 > Rails.env
=> "development"
2.0.0-p481 :002 >
謝謝,我知道這一點。事情是我想在開發模式y默認情況下啓動rails server,而無需指定env模式。更多,Thin顯示它是以開發模式啓動的,爲什麼它在調試中顯示測試?這是我的問題。 – rmagnum2002
你可以重新啓動控制檯'rails c',這對你來說就是'Loading test environment'嗎? – Prashant4224
這不是我有問題的控制檯,你不能讀這個問題嗎?我開始rails服務器..它顯示'開始'開發'。 – rmagnum2002