1
votes

I'm trying to customize the redmine app which is built on top of rails. I set up a Vagrant with nginx + passenger. When I modify the code (say, app/controllers/issues_controller.rb), the changes are not picked by web/app server. The changes are reflected only when I restart the web server.

I have virtually tried every solution available with googling.

  1. Ensure the app is running development mode. tried both rails_env directive RAILS_ENV in config/environment.rb

  2. caching is disabled

First, I thought it could be the vagrant bug so I set up the same in Digital Ocean server, changed the code, still the same.

I suspect only these but I don't know how to validate it.

  1. Nginx + passenger continues to run in development mode even after changing the environment so my changes not picked up immediately.
  2. There might be something special to redmine app that changes inside app directory is not picked up until web server restart.
1
Every-time you push new changes to the server you have to restart your app. If you are using Passenger, easiest way to restart app after new changes is to call touch tmp/restart.txt in your app directory.Sharj
I'm not talking about the server. I'm telling about local vagrant. I don't even push changes. I merely modify the file and want to see the result in my browser. Calling touch tmp/restart.txt looks okay but that internally restarts the app. But, I strongly believe there should be an easier alternative.SenG

1 Answers

0
votes

I fixed it myself by upgrading from Redmine 3.4.2 to 3.4.4. Redmine has a pertaining to Unloadable plugin convention (https://www.redmine.org/issues/20513) which appears to have been fixed in latest version. Now, I'm able to make code changes and see the results immediately in the browser.