All threads / ActionController::RoutingError (No route matches [GET] "/assets/images/4.jpg"):

Ask A Question

Notifications

You’re not receiving notifications from this thread.

ActionController::RoutingError (No route matches [GET] "/assets/images/4.jpg"):

Victor Nizeyimana asked in Rails

How to resolve this issue: ActionController::RoutingError (No route matches [GET] "/assets/images/4.jpg"):

you need add 4.jpg files in /assets/images folder

I made a mistake added all images in app/assets it need to be in public/assets.

If you put the images in your app/assets/images directory, then you should be able to call the image directly with no prefix in the path. ie. image_url('logo.png')

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 37,344+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.