0
votes

I'm using the latest version of rails, and every time i run the site on my local host, it looks fine.

however, the terminal prints multiple ActionController::RoutingErrors

Started GET "/assets/images/ui-bg_highlight-soft_100_E1EEF4_1x100.png" for 127.0.0.1 at 2013-01-27 23:50:28 -0500 Served asset /images/ui-bg_highlight-soft_100_E1EEF4_1x100.png - 404 Not Found (3ms)

ActionController::RoutingError (No route matches [GET] "/assets/images/ui-bg_highlight-soft_100_E1EEF4_1x100.png"): actionpack (3.2.11) lib/action_dispatch/middleware/debug_exceptions.rb:21:in call' actionpack (3.2.11) lib/action_dispatch/middleware/show_exceptions.rb:56:incall' railties (3.2.11) lib/rails/rack/logger.rb:32:in call_app' railties (3.2.11) lib/rails/rack/logger.rb:16:inblock in call' activesupport (3.2.11) lib/active_support/tagged_logging.rb:22:in tagged' railties (3.2.11) lib/rails/rack/logger.rb:16:incall' actionpack (3.2.11) lib/action_dispatch/middleware/request_id.rb:22:in call' rack (1.4.4) lib/rack/methodoverride.rb:21:incall' rack (1.4.4) lib/rack/runtime.rb:17:in call' activesupport (3.2.11) lib/active_support/cache/strategy/local_cache.rb:72:incall' rack (1.4.4) lib/rack/lock.rb:15:in call' actionpack (3.2.11) lib/action_dispatch/middleware/static.rb:62:incall' railties (3.2.11) lib/rails/engine.rb:479:in call' railties (3.2.11) lib/rails/application.rb:223:incall' rack (1.4.4) lib/rack/content_length.rb:14:in call' railties (3.2.11) lib/rails/rack/log_tailer.rb:17:incall' rack (1.4.4) lib/rack/handler/webrick.rb:59:in service' /Users/vicli/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/webrick/httpserver.rb:138:inservice' /Users/vicli/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/webrick/httpserver.rb:94:in run' /Users/vicli/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/webrick/server.rb:191:inblock in start_thread'

Rendered /Users/vicli/.rvm/gems/ruby-1.9.3-p362/gems/actionpack-3.2.11/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.9ms)

Started GET "/assets/logoo.png" for 127.0.0.1 at 2013-01-27 23:50:28 -0500 Served asset /logoo.png - 304 Not Modified (0ms) [2013-01-27 23:50:28] WARN Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true

Started GET "/assets/images/ui-bg_glass_65_ffffff_1x400.png" for 127.0.0.1 at 2013-01-27 23:50:28 -0500 Served asset /images/ui-bg_glass_65_ffffff_1x400.png - 404 Not Found (5ms)

ActionController::RoutingError (No route matches [GET] "/assets/images/ui-bg_glass_65_ffffff_1x400.png"): actionpack (3.2.11) lib/action_dispatch/middleware/debug_exceptions.rb:21:in call' actionpack (3.2.11) lib/action_dispatch/middleware/show_exceptions.rb:56:incall' railties (3.2.11) lib/rails/rack/logger.rb:32:in call_app' railties (3.2.11) lib/rails/rack/logger.rb:16:inblock in call' activesupport (3.2.11) lib/active_support/tagged_logging.rb:22:in tagged' railties (3.2.11) lib/rails/rack/logger.rb:16:incall' actionpack (3.2.11) lib/action_dispatch/middleware/request_id.rb:22:in call' rack (1.4.4) lib/rack/methodoverride.rb:21:incall' rack (1.4.4) lib/rack/runtime.rb:17:in call' activesupport (3.2.11) lib/active_support/cache/strategy/local_cache.rb:72:incall' rack (1.4.4) lib/rack/lock.rb:15:in call' actionpack (3.2.11) lib/action_dispatch/middleware/static.rb:62:incall' railties (3.2.11) lib/rails/engine.rb:479:in call' railties (3.2.11) lib/rails/application.rb:223:incall' rack (1.4.4) lib/rack/content_length.rb:14:in call' railties (3.2.11) lib/rails/rack/log_tailer.rb:17:incall' rack (1.4.4) lib/rack/handler/webrick.rb:59:in service' /Users/vicli/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/webrick/httpserver.rb:138:inservice' /Users/vicli/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/webrick/httpserver.rb:94:in run' /Users/vicli/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/webrick/server.rb:191:inblock in start_thread'

this is my routes.db.

  get "planner/index"

  resources :users
  resources :sessions, only: [:new, :create, :destroy]
  root to:'static_pages#home'

  match '/test', to:'planner#update'
  match '/about', to:'static_pages#about'
 match '/home', to:'static_pages#home'
  match '/planner', to:'planner#index'

  resources :sessions, only: [:new, :create, :destroy]

  match '/signup', to: 'users#new'
  match '/signin', to: 'sessions#new'
  match '/signout', to: 'sessions#destroy', via: :delete

  match '/signup', to:'users#new'


  resources :activities


  resources :restaurants

and this is what i get when i run rake routes

  planner_index GET    /planner/index(.:format)        planner#index
      users GET    /users(.:format)                users#index
            POST   /users(.:format)                users#create
   new_user GET    /users/new(.:format)            users#new
  edit_user GET    /users/:id/edit(.:format)       users#edit
       user GET    /users/:id(.:format)            users#show
            PUT    /users/:id(.:format)            users#update
            DELETE /users/:id(.:format)            users#destroy
   sessions POST   /sessions(.:format)             sessions#create
new_session GET    /sessions/new(.:format)         sessions#new
    session DELETE /sessions/:id(.:format)         sessions#destroy
       root        /                               static_pages#home
       test        /test(.:format)                 planner#update
      about        /about(.:format)                static_pages#about
       home        /home(.:format)                 static_pages#home
    planner        /planner(.:format)              planner#index
            POST   /sessions(.:format)             sessions#create
            GET    /sessions/new(.:format)         sessions#new
            DELETE /sessions/:id(.:format)         sessions#destroy
     signup        /signup(.:format)               users#new
     signin        /signin(.:format)               sessions#new
    signout DELETE /signout(.:format)              sessions#destroy
                   /signup(.:format)               users#new
 activities GET    /activities(.:format)           activities#index
            POST   /activities(.:format)           activities#create
   new_activity GET    /activities/new(.:format)       activities#new
  edit_activity GET    /activities/:id/edit(.:format)  activities#edit
       activity GET    /activities/:id(.:format)       activities#show
            PUT    /activities/:id(.:format)       activities#update
            DELETE /activities/:id(.:format)       activities#destroy
restaurants GET    /restaurants(.:format)          restaurants#index
            POST   /restaurants(.:format)          restaurants#create
 new_restaurant GET    /restaurants/new(.:format)      restaurants#new
edit_restaurant GET    /restaurants/:id/edit(.:format) restaurants#edit
     restaurant GET    /restaurants/:id(.:format)      restaurants#show
            PUT    /restaurants/:id(.:format)      restaurants#update
            DELETE /restaurants/:id(.:format)      restaurants#destroy

I'm pretty sure the error is because i have not configure my routes correctly, but i have no idea how to do so. help?

2
I think you have some invalid resource path in your application.Raghuveer

2 Answers

1
votes

it is not routes problem

you just have no images where they have to be (in /assets/images/ui-bg_highlight-soft_100_E1EEF4_1x100.png path)

0
votes

the application expects the images 'ui-bg_highlight-soft_100_E1EEF4_1x100.png' and others to be present in the assets. the images may be defined in some css. check the css files that u use. also, have a look at the layouts since they might be used there too. the correct way to refer a image in css is as

background: url(logo25x88.png) no-repeat; #do not set the path if the image is in /assets/images