Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何将本地映像从精炼厂CMS部署到Heroku?_Heroku_Ruby On Rails 4_Refinerycms_Pg - Fatal编程技术网

如何将本地映像从精炼厂CMS部署到Heroku?

如何将本地映像从精炼厂CMS部署到Heroku?,heroku,ruby-on-rails-4,refinerycms,pg,Heroku,Ruby On Rails 4,Refinerycms,Pg,我用Refinery开发了我的应用程序,我刚刚部署到Heroku。 除了通过CMS添加到页面中的图像外,其他一切都正常工作。更清楚地说,使用路由在本地上传的: 编辑页面>添加图像>上载>选择文件>保存>插入 我采取的部署步骤包括: # push to repo git push heroku master # reset DB heroku pg:reset HEROKU_POSTGRESQL_SILVER_URL PGUSER=rails PGPASSWORD=rails heroku pg:

我用Refinery开发了我的应用程序,我刚刚部署到Heroku。 除了通过CMS添加到页面中的图像外,其他一切都正常工作。更清楚地说,使用路由在本地上传的:

编辑页面>添加图像>上载>选择文件>保存>插入

我采取的部署步骤包括:

# push to repo
git push heroku master
# reset DB
heroku pg:reset HEROKU_POSTGRESQL_SILVER_URL
PGUSER=rails PGPASSWORD=rails heroku pg:push default_dev HEROKU_POSTGRESQL_SILVER_URL --app app-name-0000
一切似乎都很顺利,除了:

  • 本地上传到CMS的图像在Heroku中丢失/损坏
  • 我不知道这是否相关,但我得到的最终结果是:

    ...
    pg_restore: setting owner and privileges for INDEX index_refinery_users_on_slug
    pg_restore: setting owner and privileges for INDEX index_seo_meta_on_id
    pg_restore: setting owner and privileges for INDEX unique_schema_migrations
    WARNING: errors ignored on restore: 1
    
    我假设图像存储在数据库中,所以它们也应该被推送,对吗

    应用程序或数据库没有问题,因为我可以使用CMS将每个图像重新上传到需要它们的页面

    请给我指出正确的方向。

    我认为您需要通过Amazon S3提供资产服务。退房写这本书的人都是英雄,而且对整个过程解释得很好。您需要在AmazonAWS上设置一个bucket,向heroku提供访问信息,并使用资产预编译做一些有趣的事情。
    我很想知道您是否可以在不遵循链接页面上的说明的情况下使用图像。

    炼油厂的图像的精确副本如下: