Production server using an outdated release of capistrano - ruby-on-rails

I deploy new version via capistrano to a Ubuntu 14.04 server and now Unicorn + Nginx setup is referring to inexistent release. I get the ActionView::MissingTemplate and also a I18n::InvalidLocaleData because it failed to load the devise.en.yml file.
I pretty much followed this repo. I already restart nginx and unicorn but still gives me the same error. It's searching on a release/release_timestamp that no longer exists

You can at least confirm that Nginx is not part of the problem by directly connecting to the port or socket that Unicorn is listening on from within the server.
If Unicorn is running on a socket, see Can Curl send requests to sockets?.

Related

Running faye server with nginx and passenger?

I have successfully installed number of rails applications with nginx and passenger, but with a faye application i don't know what should be:
Nginx conf for a faye application, A nice self-explanatory tutorial will suffice.
List of things that I need to have installed to run faye server
Is it mandatory to open 443(https) port for the server and is port 9292 not needed?
Do i run faye server from rackup command in a screen or not? If no, what root do i set in nginx conf for nginx to know the start point?
How does thin server come into play? Is it needed to run?
I followed this tutorial to make my faye app. So far I have been using it through heroku, but due to latency issues I have to move to a server in the local region
Here's an example to a deployed faye app .
So far I have faye app, passenger and nginx installed on the server(centos). I am just looking for answers to above questions to proceed further. Please help Thanks in advance

Nginx timeout on Digital Ocean

I have a Ruby on Rails application running on DigitalOcean. I keep running into a 504 Gateway Timeout error with Nginx. Most recently it happened when running service unicorn restart and service nginx restart. I don't see anything apparent in the production logs about any problems with nginx or unicorn. In fact it is saying that my root view was rendered, despite me getting a time out error. I'm a bit confused about what might be causing this error and I'm not a little unsure what information I can provide in this question to be of any help.
Edit your unicorn config at /home/unicorn/unicorn.conf
and comment out the line user 'rails'
then:
service unicorn restart

find which web server rails app using

I am new to rails.
How do I find which web server rails app using?
Command to start app is
rails s puma -dp 80 -e production
Also I see apache2 is not running on server. So I guess Puma is being used. But I am not sure Puma is webserver, I found link which describes setting up Puma with nginx. So Am I using nginx? Also where do I find log of this web server?
Puma can be used as a webserver, since the command line appears to be setting the port to 80, this is probably how it is configured in your case. This works fine for the most part, but a more common configuration is to use apache or nginx as a reverse proxy and to serve static assets. (the stuff in public/assets). Requests for non-static content are then forwarded to puma.

Nginx and Unicorn Set up Not sure what I am doing

This is my first time setting up nginx and unicorn, someone directed me to this tutorial:
http://teohm.github.io/blog/2013/04/17/chef-cookbooks-for-busy-ruby-developers/
I have a general understanding of what I am doing but I am stuck on this section:
Install chef-solo on remote server
when I run
bundle exec knife solo prepare testbox
I get
ERROR: Network Error: getaddrinfo: nodename nor servname provided, or not known
Check your knife configuration and network settings
I am guessing that I don't have ~/.ssh/config
this is from the example
Host testbox
User ubuntu
Hostname ec2-51-221-13-121.ap-southeast-1.compute.amazonaws.com
IdentityFile ~/.ssh/testbox_ec2.pem
am I suppose to make a config file in .ssh? should I switch to ubuntu?
I am using heroku, how should I find my hostname? what is the pem file in ssh?
I've never used knife... It might be worth checking out this this blog post about setting up Capistrano, Nginx, and Unicorn - I've always found Capistrano to be a good deployment app (and there's lots of support for it, especially on SO).
On Heroku, you don't deploy as you would with Capistrano or any other deployment utility - you simply push to a branch on your Heroku server. See: https://devcenter.heroku.com/articles/git for how to deploy on Heroku using Git.

Bitnami Rails Nginx Thin - The service is not available. Please try again later

I'm trying to get a Bitnami Rails stack running with Nginx and 5 Thin app servers.
I have the Thin app servers running OK and I've got Nginx started and it's connected to the 5 Thin servers.
But, some code is giving me "The service is not available. Please try again later." html when I access my app from a browser. I don't know where the code is that's giving me that message.
I have the Nginx server listening on port 80.
This is my nginx.conf file: https://dl.dropbox.com/u/35302780/nginx.conf
Thanks for the help!
Your config seems fine, except those 2 if statements because IF is evil inside location block. You may want to fix that.
Seems that you are using a 3rd party upstream module. Try to uninstall that module and use the normal upstream module.

Resources