【问题标题】:Heroku push failing with error regarding sqlite3 [duplicate]Heroku推送失败并出现关于sqlite3的错误[重复]
【发布时间】:2014-07-14 14:05:31
【问题描述】:

我正在尝试推送到 master,但它不起作用。我用过

git push heroku master

我得到的错误是

       An error occurred while installing sqlite3 (1.3.9), and Bundler cannot continue.
       Make sure that `gem install sqlite3 -v '1.3.9'` succeeds before bundling.
 !
 !     Failed to install gems via Bundler.
 !
 !     Detected sqlite3 gem which is not supported on Heroku.
 !     https://devcenter.heroku.com/articles/sqlite3
 !

enter code here

 !     Push rejected, failed to compile Ruby app

To git@heroku.com:jmatharu.git enter code here
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:jmatharu.git'

在这种情况下谁能帮助我。

【问题讨论】:

标签: ruby-on-rails heroku sqlite


【解决方案1】:

那是因为 Heroku 不支持 SQLite。请参阅this Heroku Documentation on how to set up your application for PostgreSQL,这很清楚。

简而言之,您必须选择一个 PostgreSQL 计划,然后配置您的应用程序以连接到它。这主要是使用pg gem 而不是 SQLite3。

但是很快您也会想在您的开发环境中运行 PostgreSQL。 SQLite 和 Postgres 的 SQL 方言在很多方面有所不同。为开发设置 Postgres 可能有点乏味,尤其是对于 Linux 以外的任何东西。确切的程序会随着时间而改变。你最好的选择是谷歌“为[你的操作系统]设置Rails Postgresql”。

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2023-03-10
  • 2018-02-24
  • 2011-04-14
  • 1970-01-01
  • 1970-01-01
  • 2012-07-27
  • 1970-01-01
相关资源
最近更新 更多