ActionController :: RoutingError没有路由匹配[GET]

时间:2013-02-02 10:49:11

标签: ruby-on-rails-3.2 imagemagick spree

在一个新的rails项目中,我安装了Rails 3.2.11和Ruby 1.9.3-p-194我还安装了狂欢版本1.3.1。

我在安装时采取的步骤:

    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

我用identify -version检查了我的ImageMagic版本,我得到了:

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

我还验证了ImageMagick安装是否正常运行:

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

有人可以告诉我,如果我做错了,或者是另一个问题。

提前致谢。

1 个答案:

答案 0 :(得分:0)

更好地使用本指南,实际上:http://guides.spreecommerce.com/getting_started.html

你应该使用捆绑包。我没有看到关于狂欢安装的任何事情-a。我认为你应该做一个捆绑exec rails g spree:install,但我可能错了。

编辑完成所有工作并向您提交拉取请求。我不确定问题是什么,确切地说,但我所做的只是让它工作实际上再次运行spree安装,并让它覆盖之前编写的任何内容,看起来你错过了一些更多的依赖项,加上我将您的狂欢更新到1.3.2因为1.3.1有错误。我希望这会让你到达某个地方。