gpt4 book ai didi

sql - Heroku 在我卸载后提示 sqlite3

转载 作者:行者123 更新时间:2023-11-29 13:04:30 25 4
gpt4 key购买 nike

我正在尝试推送到 heroku,但最初收到的错误消息如下:

Detected sqlite3 gem which is not supported on Heroku.
! https://devcenter.heroku.com/articles/sqlite3

所以我用 heroku 替换了 sqlite3,现在它仍然报同样的错误信息

谁能帮帮我

这是我的 gemfile 和 gemfile.lock

source 'https://rubygems.org'

gem 'rails', '3.2.13'
gem 'pg'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem 'backbone-on-rails'

gemfile.lock

GEM
remote: https://rubygems.org/
specs:
actionmailer (3.2.13)
actionpack (= 3.2.13)
mail (~> 2.5.3)
actionpack (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.5)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
activemodel (3.2.13)
activesupport (= 3.2.13)
builder (~> 3.0.0)
activerecord (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
activesupport (3.2.13)
i18n (= 0.6.1)
multi_json (~> 1.0)
arel (3.0.2)
backbone-on-rails (1.0.0.0)
eco
ejs
jquery-rails
rails (>= 3.1)
builder (3.0.4)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.6.3)
eco (1.0.0)
coffee-script
eco-source
execjs
eco-source (1.1.0.rc.1)
ejs (1.1.1)
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
hike (1.2.3)
i18n (0.6.1)
journey (1.0.4)
jquery-rails (3.0.4)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.0)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.23)
multi_json (1.7.7)
pg (0.16.0)
polyglot (0.3.3)
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.3)
rack
rack-test (0.6.2)
rack (>= 1.0)
rails (3.2.13)
actionmailer (= 3.2.13)
actionpack (= 3.2.13)
activerecord (= 3.2.13)
activeresource (= 3.2.13)
activesupport (= 3.2.13)
bundler (~> 1.0)
railties (= 3.2.13)
railties (3.2.13)
actionpack (= 3.2.13)
activesupport (= 3.2.13)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (10.1.0)
rdoc (3.12.2)
json (~> 1.4)
sass (3.2.10)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
sprockets (2.2.2)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
thor (0.18.1)
tilt (1.4.1)
treetop (1.4.14)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.37)
uglifier (2.1.2)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)

PLATFORMS
ruby

DEPENDENCIES
backbone-on-rails
coffee-rails (~> 3.2.1)
jquery-rails
pg
rails (= 3.2.13)
sass-rails (~> 3.2.3)
uglifier (>= 1.0.3)

还有我的database.yml

development:
adapter: postgresql
encoding: unicode
database: poster_development
host: localhost

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: postgresql
encoding: unicode
database: poster_test
host: localhost

production:
adapter: postgresql
encoding: unicode
database: poster_production

最佳答案

sqlite3 gem 是否在您的Gemfileproduction 组中?

如果您在本地使用 sqlite3 进行开发,那么您可能希望在您的 Gemfile 中有这样的内容。

group :production do
gem 'pg'
end

group :development, :test do
gem 'sqlite3'
end

不要忘记运行 bundle install

关于sql - Heroku 在我卸载后提示 sqlite3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18005545/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com