【问题标题】:Basic Spree 2.0.3 app deployment to Heroku not working基本 Spree 2.0.3 应用程序部署到 Heroku 不起作用
【发布时间】:2013-08-08 04:21:34
【问题描述】:

我正在尝试启动并运行最基本的应用程序,并且我得到了著名的“抱歉出了点问题”

我正在关注本指南:http://guides.spreecommerce.com/developer/heroku.html

我生成了一个新的原版应用并成功将其部署到 Heroku。我做了必要的更改以使用 postgres。 “heroku open”向我展示了预期的 Rails 启动画面。那么:

spree install --auto-accept

我按照指南,添加 ruby​​ 版本,对 spree.rb 和 application.rb 进行小改动

然后

> git add .
> git commit -am "added spree"
> git push heroku master
> heroku run rake db: migrate

localhost:3000 向我展示了一个快乐的狂欢应用程序,缺少图片,因为它们应该在 s3 上,但是,heroku 坏了。我的“heroku 日志”页面如下所示:

2013-08-06T23:30:04.173821+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/act
ionpack-3.2.13/lib/abstract_controller/base.rb:167:in `process_action'
2013-08-06T23:30:04.173985+00:00 应用程序 [web.1]: 供应商/bundle/ruby/1.9.1/gems/act
ivesupport-3.2.13/lib/active_support/notifications.rb:123:in `block in instrumen
t'
2013-08-06T23:30:04.174527+00:00 应用程序[web.1]: 供应商/bundle/ruby/1.9.1/gems/jou
rney-1.0.4/lib/journey/router.rb:56:in `each'
2013-08-06T23:30:04.174857+00:00 应用程序 [web.1]: 供应商/bundle/ruby/1.9.1/gems/rac
k-1.4.5/lib/rack/conditionalget.rb:25:in `call'
2013-08-06T23:30:04.175424+00:00 应用程序 [web.1]: 供应商/捆绑/ruby/1.9.1/gems/act
ionpack-3.2.13/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
2013-08-06T23:30:04.175577+00:00 应用程序 [web.1]: 供应商/bundle/ruby/1.9.1/gems/rac
k-cache-1.2/lib/rack/cache/context.rb:185:in `lookup' 

现在,当我运行 heroku 迁移时,我收到弃用警告,提示我有“供应商/插件中的 Rails 2.3 样式插件!”但从我读过的内容来看,这并不是破坏它的原因。

有什么建议吗?

【问题讨论】:

    标签: ruby-on-rails heroku spree


    【解决方案1】:

    您需要播种您的 Spree 应用程序。

    heroku run rake db:seed
    

    这带来了,

    1. 国家/地区
    2. 角色
    3. 国家
    4. 区域

    https://github.com/spree/spree/tree/master/core/db/default/spree

    加载默认主页需要此种子数据。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-12-18
      • 2021-10-28
      • 2021-07-06
      • 1970-01-01
      • 2013-09-11
      • 1970-01-01
      • 1970-01-01
      • 2018-10-23
      相关资源
      最近更新 更多