Do we intend to use anything else besides image-url and others in Rails 4? They return different values ββthat do not seem to make sense. If I have logo.png in /app/assets/images/logo.png and I do the following, this is what I get:
image-url("logo.png") -> url("/images/logo.png") #obviously doesn't work image-path("logo.png") -> "/images/logo.png" asset-url("logo.png") -> url("/logo.png")
Of course, none of them work, because they need at least /assets in front.
UPDATE : Actually, I just noticed how can I access images in Rails 4? I have an image in /app/assets/images/logo.png . But if I go to any of the following URLs, I still cannot see my image:
http://localhost:3000/assets/logo.png http://localhost:3000/assets/images/logo.png http://localhost:3000/logo.png http://localhost:3000/images/logo.png
UPDATE 2 . The only way I can raise my logo.png is to move it to the /app/assets/stylesheets directory and then pull it up:
http:
ruby-on-rails ruby-on-rails-4 asset-pipeline
at. May 30 '13 at 18:10 2013-05-30 18:10
source share