Environment on a combat server to web applications in Ruby. How to configure the server?

After writing the application, the question arises as to deploy all the combat servers. On the local machine is a server, which turns your user and somehow doesn't cause problems. But the server is another.

Take for example Rails app (Ruby 1.9.3-head, Rails 3.2).

Have a root shell on the server, for example, with Debian/Ubuntu, nginx server is already spinning. How to build the environment in which the application will work?

My thoughts were in the direction of installing rvm, unicorn and run this stuff by the user www-data, but I failed to implement such a scheme. Can anyone have a similar solution?
October 8th 19 at 01:41
3 answers
October 8th 19 at 01:43
Suggest to read the article a Bunch of rvm + Rails + Nginx + Unicorn or deploy rails correctly, I think it all very clear described. If you have any questions — write in a personal, help than I can.
Yes, I read this article. The article describes how to deploy a single user profile (home directory) which is mounted rvm.

It is as if at odds with my vision of the world. At least I think it is more correct to install rvm on a system-wide level (installation with sudo) and then to create under each project on the server rvmrc. Also, I do not think it is right to create a user to run on behalf of the application. For user www-data, which is specially designed to work under different web apps and simple static files.

If I'm not mistaken. However, to ascertain the best solutions I created this post. - Vincent_Bergnaum commented on October 8th 19 at 01:46
Well, install rvm for the whole system, in the nginx configuration, specify your user name for all applications, but further down the article. - Viol commented on October 8th 19 at 01:49
October 8th 19 at 01:45
If you do not help the wonderful article above, then simply describe their problems with the implementation of this scheme and then You may help, and Q&A...
October 8th 19 at 01:47
On Debian I used www.dotdeb.org/ — the latest version of nginx and passenger. RVM system-wide, according to the instructions from the site (packets of suitable did not find :(). As a consequence, ruby still have to collect on the server. Have deploy scheme app->user/group adding user www-data in the application group that nginx can read the files with rights like 440.
On Ubuntu this trick was not based on wrong :( - Vincent_Bergnaum commented on October 8th 19 at 01:50

Find more questions by tags DeploymentRuby* nix-like systemsRVMSystem administration