Nginx Unicorn Rails VPS deployment -


i'm trying run rails app on digitalocean vps. server runs nginx , unicorn. i'm usind capistrano, path of app after pushing server, is

/var/www/myapp/current/ 

i'm using preconfigured droplet digitalocean seems configured search app @ following path

/home/rails/ 

i've tried change following:

in etc/nginx/nginx.conf

root /var/www/ 

in home/unicorn/unicorn.conf

app_path = "/var/www/" working_directory app_path stderr_path app_path + "/log/unicorn.stderr.log" stdout_path app_path + "log/unicorn.stdout.log" pid app_path + "/tmp/pic/unicorn.pid" 

i've followed these tutorials: http://sirupsen.com/setting-up-unicorn-with-nginx/

these "official" tutorials hoster: https://www.digitalocean.com/community/articles/how-to-1-click-install-ruby-on-rails-on-ubuntu-12-10-with-digitalocean https://www.digitalocean.com/community/articles/an-insight-into-the-configuration-of-capistrano-1

at point, following error when try restart unicorn:

parse_rackup_file': rackup file (service) not readable (argumenterror) 

is because paths wrong? additionally, first vps deploy (capistrano, unicorn, nginx), i'm little uncertain things:

do have more 1 unicorn directory? preconfigured vps has unicorn folder @ home directory, right next rails directory can't use, because capistrano adds "current" directory deploy. need move unicorn directory /var/www/ folder reason?

my third , last question: i've noticed when reading logs of server, see lot of error messages concerning missing gems. "bundle install" doesn't help. i've found solution doesn't seem work properly. right have add following top of capistrano config file?

require 'rvm/capistrano' 

i've searched these answers days (over week) , find extremely confusing know put in config files, unicorn. hope can "enlight" me before become insane :)

thank much!


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -