Updating a production

I have an application (rails 3.2, ruby 1.9) in production
I just want to change one file in the application and I am not deploying the whole application

What do I have to do ?
If it is e.g a controller file do I just have to change the file and restart the application ?
it it is e.eg an assets file e.g a css file do I also have to preompile assets again and then restart the application?


Do I have run bundle install ?
Do I have to empty the old cash with assets ?
I cannot find any description of how to just change a file in a running production ?
Anything more ?

You tell us, how do you normally deploy your app?

Most non-Heroku setups use a capistrano-based based deployment strategy, usually this involves having a folder called “releases” with subfolders timestamped for each deploy. Typically, they check out the latest code into a new folder, run the asset compilation, change the symlink of the current app to be the latest version, and then restart the application (among other things).

But you need to ask the person who set up your deployment script in the first place how it was done. We can’t tell you without knowing how it was setup in the first place.


There is really no deployment script
We had an application in development mode that was changed to production mode by changing the configuration file on the apache server with fusion passenger ( think?).

and by setting railsenv-variabeln to production

and by running rake task precompile assets

I would like to deploy it by uploading all files that according to their timestamps have been changed

then precompile assets when needed

Then What is needed ??

Generally this is not now modern web apps are deployed.

You need to set up a real deployment process for yourself – that itself could be several weeks of work in a non-Heroku environment. To get started with that I would read the docs for Capistrano.

Alternatively, you could switch your host server to Heroku and probably be up & running in about an hour or two.


Well then there’s your deployment script:

  1. upload the changes

  2. rake assets:precompile

  3. restart apache

Just in case something goes wrong, try this in a safe environment first and make sure application is running properly (you’ve got e2e tests, don’t you? :-D)

Thanks for the advices
We will do that
but why is e2e tests?