Ruby on Rails
Friday, April 15, 2016
On Friday, April 15, 2016 at 10:03:20 AM UTC+1, MCL wrote:
But in reviewing the postings here, I found this: "rake assets:precompile". Ah. I ran this, and got what looked like good results.
It returned the asset file names, with their MD5 hash strings, and indicated they are slotted into ../Weblog/public/assets/imagefilename-(big long hex hash).jpg
Well, great! Just what I needed (or so I thought in my sad and foolish ignorance...)
When I run the website, of course I get crap. I get the filenames, with the big hex hash string, shown on the webpage, instead of the
actual image! Arrrgh! Of course there is some secret hipster bit of trickery, that I need to deploy, to have a return to sanity and
correct operation of my little website. Peradventure, someone might enlighten me as to WTF this actually is?
Sounds like you have static asset serving turned off - easiest way to test this is to go straight to pick a file in public and try to go straight to that url,
e.g. if you've got public/logo.png then go to http://ip/logo.png. In production this is usually sensible since you typically have nginx / apache handling that side of things.
The setting for this is config.serve_static_files.
Fred
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/fadffc88-29a3-4b97-9fca-1624becc957f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment