2

Ubuntu Ruby on Rails on 14.04 (Nginx + Unicorn) on digitalocean. My rails application was working fine until now. But, suddenly I am facing this error and none of my stylesheets/javascript files are loading.

I did rake assets:precompile. But, it doesn't work. I don't want to set

config.assets.compile = true

This will take a toll on my website. I have been going through a lot of solutions available online but they all suggest to set the above code to 'true'. I can't understand what has gone wrong!

I, [2015-02-12T14:31:37.688066 #19201]  INFO -- : Started GET "/stylesheets/application.css" for 1.22.191.212 at 2015-02-12 14:31:37 +0000
I, [2015-02-12T14:31:37.691759 #19201]  INFO -- : Processing by VendorsController#index as CSS
I, [2015-02-12T14:31:37.695637 #19201]  INFO -- : Completed 500 Internal Server Error in 4ms
Sonali Gupta
  • 288
  • 1
  • 5
  • 17

1 Answers1

0

The error that you are getting is 500, not 404. So, it might be other problem that being able to locate the required files. Try the path to the compiled resources manually and see if they are loading.

Just to confirm, the application was already properly running in Production environment, right?

You might want to try serving the files as static content from public folder, though that will be a slight overhead on performance.

If you have already got the solution, share here! :)

ShishirK
  • 43
  • 4
  • Please refer to this. I have the same error. Don't know what to do: http://stackoverflow.com/questions/17904949/rails-app-not-serving-assets-in-production-environment – Sonali Gupta Feb 13 '15 at 18:41
  • One Question: Are you serving static assets? Specifically talking, do you have the below config - `config.serve_static_files = true` – ShishirK Feb 13 '15 at 23:47
  • Yes I am using nginx. It is automatically true in this. – Sonali Gupta Feb 14 '15 at 15:18