Nginx & Passenger not showing my Ruby on Rails app Landing page -
i'm trying deploy ruby on rails
app passenger
, nginx
server on digitalcloud droplet.
i have installed nginx , passenger on ubuntu environment. cloned rails app on /var/www/my_app
think nginx config file not set. don't know problem, because in several tutorials have same configuration , telling good.
so see this:
you can see standard rails error page my_app/public
folder.
i can't figure out why in these tutorials make root folder /public
, because there located error pages , favicon. display index page static page controller
defined in app routes
file root url.
here /opt/nginx/conf/nginx.conf
file:
#user nobody; worker_processes 1; events { worker_connections 1024; } http { passenger_root /usr/local/rvm/gems/ruby-2.1.5/gems/passenger-5.0.7; passenger_ruby /usr/local/rvm/gems/ruby-2.1.5/wrappers/ruby; include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 80; server_name my_app; passenger_enabled on; root /var/www/my_app/public; # redirect server error pages static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } }
i need display index page called home.html.erb
in /var/www/my_app/views/static_pages
through controller called static_pages
. logical somehow provide nginx
info in rails routes
file because there needs know, haven't seen that. maybe tell solution? tutorials direct public folder, doesn't work.
thanks anyways.
i found solution. needed install database because can't run without one. strange, because thought need 1 if app need storing something. fault :d
this tutorial had all! http://alexbachuk.com/launch-rails-4-application-with-passenger-and-nginx/ hope can others too.
anyway, solution found.
Comments
Post a Comment