Updating a production

38 views
Skip to first unread message

Hans

unread,
Oct 13, 2014, 11:47:04 AM10/13/14
to rubyonra...@googlegroups.com
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?

or

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 ?

Jason Fleetwood-Boldt

unread,
Oct 13, 2014, 12:21:04 PM10/13/14
to rubyonra...@googlegroups.com

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.

-Jason
----

Jason Fleetwood-Boldt

All material © Jason Fleetwood-Boldt 2014. Public conversations may be turned into blog posts (original poster information will be made anonymous). Email ja...@datatravels.com with questions/concerns about this.

Hans Marmolin

unread,
Oct 13, 2014, 12:48:06 PM10/13/14
to rubyonra...@googlegroups.com
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 ??

--
You received this message because you are subscribed to a topic in the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyonrails-talk/l3O4bKs106Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/C5D554C1-A0DE-448A-867C-3416246110D9%40datatravels.com.
For more options, visit https://groups.google.com/d/optout.

Jason Fleetwood-Boldt

unread,
Oct 13, 2014, 1:01:58 PM10/13/14
to rubyonra...@googlegroups.com

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. 

-Jason


On Oct 13, 2014, at 12:46 PM, Hans Marmolin <hans.m...@klockholm.se> wrote:

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 ??

Dennis Krupenik

unread,
Oct 14, 2014, 3:53:49 AM10/14/14
to rubyonra...@googlegroups.com
On Monday, October 13, 2014 7:48:06 PM UTC+3, Hans wrote:
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 ??

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)

Hans Marmolin

unread,
Oct 14, 2014, 4:25:11 AM10/14/14
to rubyonra...@googlegroups.com
Thanks for the advices
We will do that
but why is e2e tests?


--
You received this message because you are subscribed to a topic in the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyonrails-talk/l3O4bKs106Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages