In section 5.1 of the tutorial, Rails can’t seem to find the CSS file (custom.css or the blueprint files) or logo.png. I have triple-checked the code and it’s identical to what is in the git repository.
I have also read the asset pipeline guide and all the default values are correct.
I am a 100% sure that it has something to do with the asset pipeline, but I can’t seem to figure it out.
Thanks in advance for your help.
Here is a listing of my public directory:
$ ls public/images public/stylesheets
public/images:
logo.png
public/stylesheets:
blueprint/ custom.cssls images stylesheets
Here are the errors that I’m getting:
Started GET "/assets/custom.css" for 127.0.0.1 at 2011-12-15 14:23:20 -0800
Served asset /custom.css - 404 Not Found (14ms)
Started GET "/assets/blueprint/screen.css" for 127.0.0.1 at 2011-12-15 14:23:20 -0800
Served asset /blueprint/screen.css - 404 Not Found (2ms)
Started GET "/assets/logo.png" for 127.0.0.1 at 2011-12-15 14:23:20 -0800
Served asset /logo.png - 404 Not Found (3ms)
I think Emily is pointing you in the right direction, the application is looking for the images in assets-folder, not in the public-folder. Instead of moving it out of the public folder, I would recommend to disable the asset-pipeline as long as you are dealing with the tutorial (just so you can follow the tutorial as written).
To achieve this, go into your
config/application.rb-file and look out for the following line:and set the value to false
You will also have to remove/comment out
sass-railsfrom your Gemfile.After that restart your server and it should work as expected.
Once you have finished the tutorial, you should consider bending your head around the asset-pipeline, since the benefits out of it are worth the while 🙂