开发者

How can I force require a file in the console? The 'reload!' command just dosen't work!

开发者 https://www.devze.com 2023-01-09 07:52 出处:网络
I use rails-3.0.0.beta3 and ruby-1.9.2-preview3. I have defined some开发者_JAVA百科 new methods in the application_controller.rb, and need to test them in the console.

I use rails-3.0.0.beta3 and ruby-1.9.2-preview3.

I have defined some开发者_JAVA百科 new methods in the application_controller.rb, and need to test them in the console.

If I changed some codes in the application_controller.rb.

I have to restart the console.

I have tried to use 'reload!' command, just dosen't work.

And then I use "require 'applicatioin.rb'",

still dosen't work.

Help!


Make sure you're in dev mode, then try this:

ActiveSupport::Dependencies.clear
0

精彩评论

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