简体   繁体   中英

Editing Ruby Applications

Testia Tarantula is a RoR testing suite running on Apache. After installing Ruby and Tarantula app on a CentOS server, I can access the web-based interface. Usually when I want to hack something open-source like Mantis, I change some code in the apache/Mantis folder or whatever and refresh the webpage. Even if I delete a whole wack of code, nothing seems to happen. If I make changes to a .js file in a Ruby app (or similar file), do I need to compile?

You have to restart the server. Rails (in production mode) precompiles the assets and it needs to be recompiled.

If you change a js file then you have to reload the page at the very least. In production mode you pretty much need to restart the server if you change anything because your assets may be precompiled.

In development mode you don't have to restart the server for everything. You can see changes in views and controllers without restarting but you do need to restart the server for changes to the model.

Running a local rails server is very useful from this point of view. Just type rail -s on the command line and go to localhost:3000

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM