anipendakur
anipendakur

Reputation: 95

Assets not found Rails on Webrick thin

I'm running my rails WEBrick server with 'thin' gem for minimal logging in development mode. I use data tables to show some tables on my html page. But I get errors with assets:

Started GET "/app/assets/images/sort_both.png" for 127.0.0.1 at 2012-11-24 20:14:45 -0800 2012-11-24 20:14:45 -- ActionController::RoutingError (No route matches [GET] "/app/assets/images/sort_both.png")

I have made sure that the image in the folder exists.

I have changed the config in config/environments/development.rb for WEBrick to be able to serve static content with:

config.serve_static_assets = true

I can't figure out what's going on. Could somebody please help me on this?

Cheers, ANi

Upvotes: 1

Views: 686

Answers (1)

reconbot
reconbot

Reputation: 5287

The logs are saying you're asking for the wrong url. Usually /app isn't part of the http request. Make sure you're using asset_path in your views.

I also bet a GET request to /assets/images/sort_both.png would work.

Upvotes: 2

Related Questions