2013-02-02 79 views
0

在新鮮的rails項目上,我安裝了Rails 3.2.11和Ruby 1.9.3-p-194,我還安裝了spree版本1.3.1。ActionController :: RoutingError沒有路由匹配[GET]

,我在安裝所採取的步驟:

rails new mystore 
    cd mystore 
    spree install -A 
    rails s 

一切都沒有錯誤,當我安裝,但是當我在http://localhost:3000/產品圖片打開它不加載,但大禮包標誌被加載。

這是最後的圖像,但我得到了相同的所有產品圖片:

Started GET "/spree/products/6/small/ror_jr_spaghetti.jpeg" for 127.0.0.1 at 2013-02-02 11:33:54 +0100 

ActionController::RoutingError (No route matches [GET] "/spree/products/6/small/ror_jr_spaghetti.jpeg"): 
    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:in `call' 
    railties (3.2.11) lib/rails/rack/logger.rb:32:in `call_app' 
    railties (3.2.11) lib/rails/rack/logger.rb:16:in `block 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:in `call' 
    actionpack (3.2.11) lib/action_dispatch/middleware/request_id.rb:22:in `call' 
    rack (1.4.4) lib/rack/methodoverride.rb:21:in `call' 
    rack (1.4.4) lib/rack/runtime.rb:17:in `call' 
    activesupport (3.2.11) lib/active_support/cache/strategy/local_cache.rb:72:in `call' 
    rack (1.4.4) lib/rack/lock.rb:15:in `call' 
    actionpack (3.2.11) lib/action_dispatch/middleware/static.rb:62:in `call' 
    railties (3.2.11) lib/rails/engine.rb:479:in `call' 
    railties (3.2.11) lib/rails/application.rb:223:in `call' 
    rack (1.4.4) lib/rack/content_length.rb:14:in `call' 
    railties (3.2.11) lib/rails/rack/log_tailer.rb:17:in `call' 
    rack (1.4.4) lib/rack/handler/webrick.rb:59:in `service' 
    /home/vane/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service' 
    /home/vane/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run' 
    /home/vane/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread' 


    Rendered /home/vane/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.11/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (1.2ms) 


Started GET "/assets/favicon.ico" for 127.0.0.1 at 2013-02-02 11:33:54 +0100 
Served asset /favicon.ico - 304 Not Modified (28ms) 
[2013-02-02 11:33:54] WARN Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true 

我檢查我的版本ImageMagic與identify -version和我:

Version: ImageMagick 6.8.2-2 2013-02-01 Q16 http://www.imagemagick.org 
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC 
Features: DPC OpenMP 
Delegates: fontconfig freetype pango png ps x xml zlib 

我也verifyed說ImageMagick安裝正常工作:

/usr/local/bin/convert logo: logo.gif

有人可以告訴我,如果我做錯了什麼或這是另一個問題。

在此先感謝。

+0

清除數據庫('rake db:reset'),然後手動重新生成數據('rake db:seed'),看看是否會引發任何額外的錯誤或工作。我不知道爲什麼它不會立即顯示圖像。 –

+0

'rake db:reset'運行良好,但是當我運行'rake db:seed'時,它彈出這個錯誤:'loading fixture /home/usr/.rvm/gems/ruby-1.9.3-p194/gems/spree_core -1.3.1/db/default/spree/countries.yml rake中止! SQLite3 :: ConstraintException:PRIMARY KEY必須是唯一的:INSERT INTO「spree_countries」(「name」,「iso3」,「iso」,「iso_name」,「id」,「numcode」)VALUES('Chad','TCD ','TD','CHAD',39,148)' –

回答

0

更好地利用該指南,實際上是:http://guides.spreecommerce.com/getting_started.html

,你應該使用捆綁。我沒有看到關於狂熱安裝的任何內容-a。我認爲你應該做一個捆綁exec rails g spree:安裝,但我可能是錯的。

編輯知道了所有的工作,並向您提交了拉請求。我不確定這個問題到底是什麼,但是我所做的所有工作實際上是再次運行spree install,然後讓它覆蓋之前寫的任何內容,而且看起來你錯過了更多的依賴關係,再加上我更新你的spree到1.3.2導致1.3.1有錯誤。我希望這會讓你在某個地方。

+0

我遵循指南並使用'bundle exec rails g spree:install'來完成它,但是我得到了同樣的錯誤。 '-A'用於接受所有的默認值。 謝謝你的回答和你的時間。 –

+0

我以前從來沒有聽說過,無論如何,你是否檢查過路線?捆綁exec耙路線和檢查?看起來這條路線與您應該擁有的路線不匹配。這是一個默認的產品,用bundle exec rake db:seed加載或者它是如何放入的? – Allen

+0

我有圖片'update_positions_admin_product_images /admin/products/:product_id/images/update_positions(.:format)spree/admin/images#update_positions ...'這條路線,但這條路線是爲管理面板。我沒有任何其他路線包含圖像。你認爲有可能被列爲產品屬性嗎? –

相關問題