Slow Deployment for a Large Rails 3 Application Using Ruby 1.9.2

There are three problems.

  • As with rake Keprinan, the task is very slow. We need to do several things for each deployment, for example, restarting DelayedJob, making sure that Thinking Sphinx is updated, etc. I read that the problem with Ruby 1.9 is due to the need to check all the paths for each requirement, and this, I hope, will be fixed soon. But are there any workarounds for deploying the lid?

  • Passenger instances don't start either, maybe the same problem with Ruby 1.9 Path, but are there any workarounds?

  • Gemfile.lock is updated every time rake and cap are called. It is always the same thing that changes. +/- net-scp

This application is called Open Active Democracy and is located here https://github.com/rbjarnason/open-active-democracy

+4
source share
3 answers

3) This is most likely Gemfile.lock, which is the culprit, gemfile update is required forever, and it should not be updated every time.

I will try manually just to install the package on the server and see what happens, maybe you do not have the package file in a permanent location for capistrano? You can also try just adding net-scp to your Gemfile for a quick fix.

On my production server, it looks like this:

user@prodmachine :/var/www/railsapp/current/.bundle# cat config --- BUNDLE_FROZEN: "1" BUNDLE_DISABLE_SHARED_GEMS: "1" BUNDLE_WITHOUT: development:test BUNDLE_PATH: /var/www/railsapp/shared/bundle 

2) start-up time, assembly and installation of the corrected 1.9.2 to obtain accelerated file downloads:

http://www.rubyinside.com/get-edge-ruby-faster-loading-ruby-1-9-2-now-4973.html

You can also install ruby-1.9.2-p290 to get acceleration when downloading files that are not as sharp.

+1
source

When you start multiple servers with different roles, it usually takes some time to deploy. One of my larger applications takes up to 10-15 minutes to deploy. The only thing that users should notice is when the passenger reboots, which takes as long as your application environment requires (I don’t think you can do something about it).

The worst thing that can happen is that your Internet falls out during a long deployment, which can leave things in an undesirable state. This happened to me, which prompted me to write captivate so that this does not happen again ...

0
source

A faster alternative would also be to use whiskey_disk , described as "awkward quick deployment." It is simple and fun, and may be just what you need.

0
source

Source: https://habr.com/ru/post/1346267/


All Articles