0

在一个新的 Rails 项目中,我安装了带有 Ruby 1.9.3-p-194 的 Rails 3.2.11,我还安装了 spree 版本 1.3.1。

我在安装时采取的步骤:

    rails new mystore
    cd mystore
    spree install -A
    rails s

安装时一切正常,但是当我在http://localhost:3000/未加载产品图像中打开它时,但加载了 spree 徽标。

这是最后一张图片,但我对所有产品图片都一样:

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

我还验证了 ImageMagick 安装是否可以正常工作:

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

有人可以告诉我我做错了什么还是另一个问题。

提前致谢。

4

1 回答 1

0

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

你应该使用捆绑器。我没有看到任何关于 spree install -a 的信息。我认为你应该做一个 bundle exec rails g spree:install,但我可能错了。

编辑一切正常并向您提交了拉取请求。我不确定到底是什么问题,但我所做的只是再次运行 spree 安装,让它覆盖之前写的任何内容,看起来你缺少更多依赖项,另外我将您的大礼包更新到 1.3.2 导致 1.3.1 出现错误。我希望这能让你有所收获。

于 2013-02-02T13:36:41.090 回答