small medium large xlarge

Generic-user-small
19 Dec 2012, 12:35
mona s (1 post)

Hi, i am referring a book and it was working great till section 11.3. I implemented changes and then from then it is showing me this error. I dont know where i went wrong. Searched a lot and frustated now. Can you help?

Here is application.html.erb <!DOCTYPE html>

Pragprog Books Online Store <%= stylesheet_link_tag "scaffold" %> <%= stylesheet_link_tag "depot", :media => "all" %> <%= javascript_include_tag "application" %> <%= csrf_meta_tag %>
<%= image_tag("logo.png") %> <%= @page_title || "Pragmatic Bookshelf" %>
<% if @cart %> <%= hidden_div_if(@cart.line_items.empty?, id: 'cart') do %> <%= render @cart %> <% end %> <% end %> Home
Questions
News
Contact
<%= yield %>

Here is routes.rb

Depot::Application.routes.draw do get ‘admin’ => ‘admin#index’

controller :sessions do get ‘login’ => :new post ‘login’ => :create delete ‘logout’ => :destroy end

resources :users resources :orders resources :line_items resources :carts

get “store/index” resources :products do get :who_bought, on: :member end

# The priority is based upon order of creation: # first created -> highest priority.

# Sample of regular route: # match ‘products/:id’ => ‘catalog#view’ # Keep in mind you can assign values other than :controller and :action

# Sample of named route: # match ‘products/:id/purchase’ => ‘catalog#purchase’, :as => :purchase # This route can be invoked with purchase_url(:id => product.id)

# Sample resource route (maps HTTP verbs to controller actions automatically): # resources :products

# Sample resource route with options: # resources :products do # member do # get ‘short’ # post ‘toggle’ # end # # collection do # get ‘sold’ # end # end

# Sample resource route with sub-resources: # resources :products do # resources :comments, :sales # resource :seller # end

# Sample resource route with more complex sub-resources # resources :products do # resources :comments # resources :sales do # get ‘recent’, :on => :collection # end # end

# Sample resource route within a namespace: # namespace :admin do # # Directs /admin/products/* to Admin::ProductsController # # (app/controllers/admin/products_controller.rb) # resources :products # end

# You can have the root of your site routed with “root” # just remember to delete public/index.html. root to: ‘store#index’, as: ‘store’ # See how all your routes lay out with “rake routes”

# This is a legacy wild controller route that’s not recommended for RESTful applications. # Note: This route will make all actions in every controller accessible via GET requests. # match ‘:controller(/:action(/:id))(.:format)’ end

Here is log:

Started GET “/stylesheets/scaffold.css” for 127.0.0.1 at 2012-12-19 17:54:13 +0530

ActionController::RoutingError (No route matches [GET] “/stylesheets/scaffold.css”): actionpack (3.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:21:in call' actionpack (3.2.3) lib/action_dispatch/middleware/show_exceptions.rb:56:in call’ railties (3.2.3) lib/rails/rack/logger.rb:26:in call_app' railties (3.2.3) lib/rails/rack/logger.rb:16:in call’ actionpack (3.2.3) lib/action_dispatch/middleware/request_id.rb:22:in call' rack (1.4.1) lib/rack/methodoverride.rb:21:in call’ rack (1.4.1) lib/rack/runtime.rb:17:in call' activesupport (3.2.3) lib/active_support/cache/strategy/local_cache.rb:72:in call’ rack (1.4.1) lib/rack/lock.rb:15:in call' actionpack (3.2.3) lib/action_dispatch/middleware/static.rb:62:in call’ railties (3.2.3) lib/rails/engine.rb:479:in call' railties (3.2.3) lib/rails/application.rb:220:in call’ rack (1.4.1) lib/rack/content_length.rb:14:in call' railties (3.2.3) lib/rails/rack/log_tailer.rb:14:in call’ rack (1.4.1) lib/rack/handler/webrick.rb:59:in service' M:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:138:in service’ M:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:94:in run' M:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/server.rb:191:in block in start_thread’

Rendered M:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (1.0ms)

Started GET “/stylesheets/depot.css” for 127.0.0.1 at 2012-12-19 17:54:13 +0530

ActionController::RoutingError (No route matches [GET] “/stylesheets/depot.css”): actionpack (3.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:21:in call' actionpack (3.2.3) lib/action_dispatch/middleware/show_exceptions.rb:56:in call’ railties (3.2.3) lib/rails/rack/logger.rb:26:in call_app' railties (3.2.3) lib/rails/rack/logger.rb:16:in call’ actionpack (3.2.3) lib/action_dispatch/middleware/request_id.rb:22:in call' rack (1.4.1) lib/rack/methodoverride.rb:21:in call’ rack (1.4.1) lib/rack/runtime.rb:17:in call' activesupport (3.2.3) lib/active_support/cache/strategy/local_cache.rb:72:in call’ rack (1.4.1) lib/rack/lock.rb:15:in call' actionpack (3.2.3) lib/action_dispatch/middleware/static.rb:62:in call’ railties (3.2.3) lib/rails/engine.rb:479:in call' railties (3.2.3) lib/rails/application.rb:220:in call’ rack (1.4.1) lib/rack/content_length.rb:14:in call' railties (3.2.3) lib/rails/rack/log_tailer.rb:14:in call’ rack (1.4.1) lib/rack/handler/webrick.rb:59:in service' M:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:138:in service’ M:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:94:in run' M:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/server.rb:191:in block in start_thread’

Rendered M:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (1.0ms)

Started GET “/javascripts/application.js” for 127.0.0.1 at 2012-12-19 17:54:13 +0530

ActionController::RoutingError (No route matches [GET] “/javascripts/application.js”): actionpack (3.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:21:in call' actionpack (3.2.3) lib/action_dispatch/middleware/show_exceptions.rb:56:in call’ railties (3.2.3) lib/rails/rack/logger.rb:26:in call_app' railties (3.2.3) lib/rails/rack/logger.rb:16:in call’ actionpack (3.2.3) lib/action_dispatch/middleware/request_id.rb:22:in call' rack (1.4.1) lib/rack/methodoverride.rb:21:in call’ rack (1.4.1) lib/rack/runtime.rb:17:in call' activesupport (3.2.3) lib/active_support/cache/strategy/local_cache.rb:72:in call’ rack (1.4.1) lib/rack/lock.rb:15:in call' actionpack (3.2.3) lib/action_dispatch/middleware/static.rb:62:in call’ railties (3.2.3) lib/rails/engine.rb:479:in call' railties (3.2.3) lib/rails/application.rb:220:in call’ rack (1.4.1) lib/rack/content_length.rb:14:in call' railties (3.2.3) lib/rails/rack/log_tailer.rb:14:in call’ rack (1.4.1) lib/rack/handler/webrick.rb:59:in service' M:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:138:in service’ M:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:94:in run' M:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/server.rb:191:in block in start_thread’

Rendered M:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.0ms)

Started GET “/images/logo.png” for 127.0.0.1 at 2012-12-19 17:54:13 +0530

ActionController::RoutingError (No route matches [GET] “/images/logo.png”): actionpack (3.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:21:in call' actionpack (3.2.3) lib/action_dispatch/middleware/show_exceptions.rb:56:in call’ railties (3.2.3) lib/rails/rack/logger.rb:26:in call_app' railties (3.2.3) lib/rails/rack/logger.rb:16:in call’ actionpack (3.2.3) lib/action_dispatch/middleware/request_id.rb:22:in call' rack (1.4.1) lib/rack/methodoverride.rb:21:in call’ rack (1.4.1) lib/rack/runtime.rb:17:in call' activesupport (3.2.3) lib/active_support/cache/strategy/local_cache.rb:72:in call’ rack (1.4.1) lib/rack/lock.rb:15:in call' actionpack (3.2.3) lib/action_dispatch/middleware/static.rb:62:in call’ railties (3.2.3) lib/rails/engine.rb:479:in call' railties (3.2.3) lib/rails/application.rb:220:in call’ rack (1.4.1) lib/rack/content_length.rb:14:in call' railties (3.2.3) lib/rails/rack/log_tailer.rb:14:in call’ rack (1.4.1) lib/rack/handler/webrick.rb:59:in service' M:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:138:in service’ M:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:94:in run' M:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/server.rb:191:in block in start_thread’

Rendered M:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (1.0ms)

Started GET “/images/ruby.jpg” for 127.0.0.1 at 2012-12-19 17:54:13 +0530

ActionController::RoutingError (No route matches [GET] “/images/ruby.jpg”): actionpack (3.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:21:in call' actionpack (3.2.3) lib/action_dispatch/middleware/show_exceptions.rb:56:in call’ railties (3.2.3) lib/rails/rack/logger.rb:26:in call_app' railties (3.2.3) lib/rails/rack/logger.rb:16:in call’ actionpack (3.2.3) lib/action_dispatch/middleware/request_id.rb:22:in call' rack (1.4.1) lib/rack/methodoverride.rb:21:in call’ rack (1.4.1) lib/rack/runtime.rb:17:in call' activesupport (3.2.3) lib/active_support/cache/strategy/local_cache.rb:72:in call’ rack (1.4.1) lib/rack/lock.rb:15:in call' actionpack (3.2.3) lib/action_dispatch/middleware/static.rb:62:in call’ railties (3.2.3) lib/rails/engine.rb:479:in call' railties (3.2.3) lib/rails/application.rb:220:in call’ rack (1.4.1) lib/rack/content_length.rb:14:in call' railties (3.2.3) lib/rails/rack/log_tailer.rb:14:in call’ rack (1.4.1) lib/rack/handler/webrick.rb:59:in service' M:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:138:in service’ M:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:94:in run' M:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/server.rb:191:in block in start_thread’

Rendered M:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.0ms)

Started GET “/images/rtp.jpg” for 127.0.0.1 at 2012-12-19 17:54:13 +0530

ActionController::RoutingError (No route matches [GET] “/images/rtp.jpg”): actionpack (3.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:21:in call' actionpack (3.2.3) lib/action_dispatch/middleware/show_exceptions.rb:56:in call’ railties (3.2.3) lib/rails/rack/logger.rb:26:in call_app' railties (3.2.3) lib/rails/rack/logger.rb:16:in call’ actionpack (3.2.3) lib/action_dispatch/middleware/request_id.rb:22:in call' rack (1.4.1) lib/rack/methodoverride.rb:21:in call’ rack (1.4.1) lib/rack/runtime.rb:17:in call' activesupport (3.2.3) lib/active_support/cache/strategy/local_cache.rb:72:in call’ rack (1.4.1) lib/rack/lock.rb:15:in call' actionpack (3.2.3) lib/action_dispatch/middleware/static.rb:62:in call’ railties (3.2.3) lib/rails/engine.rb:479:in call' railties (3.2.3) lib/rails/application.rb:220:in call’ rack (1.4.1) lib/rack/content_length.rb:14:in call' railties (3.2.3) lib/rails/rack/log_tailer.rb:14:in call’ rack (1.4.1) lib/rack/handler/webrick.rb:59:in service' M:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:138:in service’ M:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:94:in run' M:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/server.rb:191:in block in start_thread’

Rendered M:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (1.0ms)

Started GET “/images/wd4d.jpg” for 127.0.0.1 at 2012-12-19 17:54:13 +0530

ActionController::RoutingError (No route matches [GET] “/images/wd4d.jpg”): actionpack (3.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:21:in call' actionpack (3.2.3) lib/action_dispatch/middleware/show_exceptions.rb:56:in call’ railties (3.2.3) lib/rails/rack/logger.rb:26:in call_app' railties (3.2.3) lib/rails/rack/logger.rb:16:in call’ actionpack (3.2.3) lib/action_dispatch/middleware/request_id.rb:22:in call' rack (1.4.1) lib/rack/methodoverride.rb:21:in call’ rack (1.4.1) lib/rack/runtime.rb:17:in call' activesupport (3.2.3) lib/active_support/cache/strategy/local_cache.rb:72:in call’ rack (1.4.1) lib/rack/lock.rb:15:in call' actionpack (3.2.3) lib/action_dispatch/middleware/static.rb:62:in call’ railties (3.2.3) lib/rails/engine.rb:479:in call' railties (3.2.3) lib/rails/application.rb:220:in call’ rack (1.4.1) lib/rack/content_length.rb:14:in call' railties (3.2.3) lib/rails/rack/log_tailer.rb:14:in call’ rack (1.4.1) lib/rack/handler/webrick.rb:59:in service' M:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:138:in service’ M:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:94:in run' M:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/server.rb:191:in block in start_thread’

Rendered M:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (1.0ms)

You must be logged in to comment