1

我正在尝试在 Heroku 上使用 phantom.js 自定义 buildpack(https://github.com/stomita/heroku-buildpack-phantomjs

我按照指示创建了一个项目

heroku create --stack cedar --buildpack http://github.com/stomita/heroku-buildpack-phantomjs.git

但是当我这样做时,一切似乎都出错了。我最初认为这是其他一些问题(Heroku run rake db:migrate 错误,“没有要加载的此类文件--bundler/setup”)但在创建一个没有 buildpack 的新应用程序后意识到它是导致问题的 buildpack .

基本上,当我使用 buildpack 时,一切都会出错:我的进程都没有启动,捆绑进程不起作用等。

我该如何解决这个问题?

4

1 回答 1

0

这对我有用:

  1. 运行heroku create --stack cedar --buildpack http://github.com/stomita/heroku-buildpack-phantomjs.git以在您的 Heroku 帐户上创建一个新的 Heroku 应用程序。
  2. 转到 Heroku 并找到您的应用程序存储库。
  3. 签出git@heroku.com:stark-mist-2296.git并切换到克隆目录。
  4. 运行rails new .以创建一个新的空白 Rails 应用程序。
  5. 更改Gemfile为在 Heroku 上使用 Postgres——<code>pg 而不是sqlite3.
  6. 运行git push origin master

您应该会看到一个空白的 Rails 应用程序。

可能是您没有pg在 Heroku 上使用 gem。

参考

于 2012-06-20T06:29:01.990 回答