nginx - Rails application works in development but is empty in production -


my rails 4 application runs in development mode, @ production see empty page.

it's running unicorn nginx in centos 7 vps.

any hint need?

unicorn_rails -c config/unicorn.rb -d 

rails development

unicorn_rails -c config/unicorn.rb -d -e production 

rails production

the logs of nginx, unicorn , rails don't show errors.

rake routes
[root@mycentos my_app]# rake routes

   prefix verb   uri pattern               controller#action     blogs    /blogs(.:format)          blogs#index           post   /blogs(.:format)          blogs#create  new_blog    /blogs/new(.:format)      blogs#new edit_blog    /blogs/:id/edit(.:format) blogs#edit      blog    /blogs/:id(.:format)      blogs#show           patch  /blogs/:id(.:format)      blogs#update           put    /blogs/:id(.:format)      blogs#update           delete /blogs/:id(.:format)      blogs#destroy 

in development can access route, shows me error messages when route doesn't exist. in production, blank. works in development - blank in production

i'm not boldly switching on answer area here, it's time. know node.js can used create single page app on rails. it's want try, haven't done, yet.

before diving isolate , conquer scenario, have looked @ production log. stacked errors. tell anything?

i approach not knowing complexion of problem. and, don't know you've tried. but, try isolate problem removing components , complexity. suggest creating simple "hello world" page @ root. that's it. if can resolve , deploy, can progress.

getting "hello world!" page prove mvc code base setup , deploy functioning. , isolate database out variable in production.

hello world! simple test - have not seen rails app did not require root_url. (maybe node.js setup not req. one? dunno.) in routes.db add

  root 'static_pages#home' 

rake in , make sure path shows up. create home.html.erb in /static pages has html "hello world." deploy + test dev + prod using same command you've been using:

unicorn_rails -c config/unicorn.rb -d -e production 

if working, know deploy works, if not working in production, remove component...

unplug node.js

in simple "hello page" world app, don't need node.js. if 100% confident can't introducing problem, disregard advice.

hello world, still not working without database , without node.js? @ production parameters, gemfile, etc. i'll add detail here if needed. although hope problem isn't in environments/production.rb...but be.


it seem rails exp. on node.js better answer question, since no 1 else stepping up, hope input of help, if see problem in way.


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -