White pages after testing my app in production env locally

12 views
Skip to first unread message

Quake Live

unread,
Sep 18, 2015, 6:12:45 AM9/18/15
to rubyonra...@googlegroups.com
Hey guys,

I wanted to test my rails app (Rails version 4.2.3) in the production
environment. So I prepared for this like followed:

i) I precompiled all of my assets, using rake assets:precompile

ii) In the production.rb I changed the line from
config.serve_static_files = false to
config.serve_static_files = true

After the preperation I started my Webrick server in production
envirnonment.

I executed my Rails app in the browser and there I got confused.

The content (in form of text) is present. Everything else is not.

No stylesheets, no images are shown. So everything looks like

black-text on white background. If i check the sourcecode inside the
browser

then I see that everything was loaded "successfully".


<link rel="stylesheet" media="all"
href="/assets/xyz/application-f850a9bf8f9ca4c8b52f430078d52a9a.css"
data-turbolinks-track="true" />

<script
src="/assets/xyz/application-be4f23807ebc81ad7ec898cdef9b3b65.js"
data-turbolinks-track="true"></script>


are present. Also the images are. But they dont affect anything.


I tried to find a solution on google.com but still after 2 hours of
research, i have not found anything that could help me.

--
Posted via http://www.ruby-forum.com/.

Quake Live

unread,
Sep 18, 2015, 8:03:37 AM9/18/15
to rubyonra...@googlegroups.com
Hey guys,

It is me again. I finally managed to solve the "problem". Well it was
not really a problem. I forgot to mention to you that I switched from
Webrick to Passenger server.

I was pre-compiling the assets during my app ran on Webrick server.

That's the reason why the assets were not available when I started the
application with Passenger.

So I just re-pre-compiled the assets => restarted the Passenger server
=> reloaded my rails map and everything was just fine.
Reply all
Reply to author
Forward
0 new messages