Friday, 15 February 2013

ruby - Rails on Webfaction (Passenger and Nginx) -



ruby - Rails on Webfaction (Passenger and Nginx) -

this first time deploying rails app production server, have done everything. i'm stuck process create app run in production mode, typed

$ export rails_env=production

and

$ echo $rails_env

and terminal throws in production mode, when go url in app not yet defined me, server is still debugging templates, want server throws default 404 page.

be patient me i'm new in this. :)

you need alter rails_env setting in nginx/conf/nginx.conf, follows:

server { hear <port_number>; passenger_enabled on; root /home/<username>/webapps/<app_name>/<app>/public; server_name localhost; rails_env production; }

if , greeted "502 bad gateway" error efforts, issue may don't have secret_key_base environment variable set. can generate suitable value rake secret, , add together export secret_key_base="<secret>" wherever you're setting other environment variables.

webfaction's rails deployment documentation has improved substantially, 1 of number of non-intuitive steps still skips over.

ruby-on-rails ruby nginx passenger webfaction

No comments:

Post a Comment