简体   繁体   中英

Rails 4 Capistrano3 Deploy Setup

I have Rails 4 application setup under version control, I was running it on puma server on the staging environment. Now I decided to use capistrano3 for deployment, I added the necessary gems and everything. I can even run cap staging deploy successfully and the puma server start. But when I load the URL in the browser, I see the default apache config page saying, congratulations the server is set up.

I tried all the common ports after URL in the browser, but none of them works. I think I'm extremely close, but missing a key(and silly) piece in the puzzle. Can anyone help out?

Make sure that the location is correct. I assume that puma is being proxied to from Apache, but Apache is serving the assets. It sounds like you need to verify that the vhost is correct, and it is actually proxying to the right port. Check the apache logs for this. You can set a custom log on your vhost like:

ErrorLog /var/log/apache2/myapp-error_log
CustomLog /var/log/apache2/myapp-access_log common

Also, make sure that Apache is pointing to the correct directory for the assets. It will probably be something like /var/www/myapp/current/public .

Other than this, you will need to do some more debugging. Stack Overflow is usually more helpful if you have a specific problem or error to address.

Good luck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM