Search code examples
ruby-on-railsthin

Thin missing css


I'm debugging a Bitnami Rails implementation. I'd like to run Thin instead of Apache to see if my error still shows up.

I go to the Rails app directory using SSH and run this command:

$ thin -e production start

And Thin starts up on 3000. But, when I access using a browser, it looks like none of the CSS is getting used.

Any ideas how I can fix it?

Thanks!

This is what it looks like:

enter image description here


Solution

  • By default Rails does not serve static assets in production.

    Usually there is a line

    config.serve_static_assets = false
    

    in config/production.rb.

    Setting it to true will overwrite the default. If there is no such line, it should be added

    If the problems persist, please provide your rails version, and whether you use asset pipeline.