vendredi 17 juin 2016

Rails server not loading application.css

Already apologize for the dumb question. I've been studying about ruby and rails not for long, so do not know much about rails.

I'm starting to work with an old application, and managed to install ruby , rails and mysql into Ubuntu 14.04 LTS, and I'm able to run the server without a problem, but it's not being able to run any css file from app/assets path. From start the app couldn't run any javascript either, and I managed to make it work by removing the equals sign from the require code, at the top of app/assets/javascript/application.js file:

// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://ift.tt/1nyjx9R
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// require jquery     (was //= require jquery)
// require jquery_ujs (was //= require jquery_ujs)
// require_tree .     (was //= require_tree .)

I could make the page load the css if I paste the stylesheet folder from app/assets to public folder, but I know the app is running the correct path in the server where it's running.
So, what could I be missing to get my assets to load app/assets/stylesheet files, besides public/stylesheet?

Just for info, here's the ruby and rails versions (pretty old by the way, another problem I should solve next):
Ruby = ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
Rails = Rails 3.1.3

Aucun commentaire:

Enregistrer un commentaire