gpt4 book ai didi

ruby-on-rails - Heroku 推送错误 "Detected sqlite3 gem which is not supported on Heroku."

转载 作者:行者123 更新时间:2023-11-29 12:37:18 24 4
gpt4 key购买 nike

我正在尝试将我的应用程序推送到 Heroku。我在开发中使用了 sqlite gem,在生产中使用了 pg gem,但我仍然得到:

Detected sqlite3 gem which is not supported on Heroku.

错误。

remote:        An error occurred while installing sqlite3 (1.3.10), and Bundler cannot
remote: continue.
remote: Make sure that `gem install sqlite3 -v '1.3.10'` succeeds before bundling.
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Detected sqlite3 gem which is not supported on Heroku.
remote: ! https://devcenter.heroku.com/articles/sqlite3
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to fierce-thicket-3015.
remote:

这是我的 Gemfile:

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.7'
# Use sqlite3 as the database for Active Record
group :devlopment, :test do
gem 'sqlite3'
end

group :production do
gem 'pg', '0.17.1'
gem 'rails_12factor', '0.0.2'
end

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
gem 'bootstrap-sass'
gem 'autoprefixer-rails'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'jcrop-rails-v2'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc

# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring', group: :development

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]

gem 'devise'
gem 'devise_invitable'
gem "mini_magick"
gem 'carrierwave'
gem 'will_paginate-bootstrap'
gem 'acts_as_commentable'
gem 'acts_as_votable'
gem 'acts-as-taggable-on'

group :development do
gem "better_errors"
gem "binding_of_caller"
gem "letter_opener"
end

这是我的 Gemfile.lock

GEM
remote: https://rubygems.org/
specs:
actionmailer (4.1.7)
actionpack (= 4.1.7)
actionview (= 4.1.7)
mail (~> 2.5, >= 2.5.4)
actionpack (4.1.7)
actionview (= 4.1.7)
activesupport (= 4.1.7)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
actionview (4.1.7)
activesupport (= 4.1.7)
builder (~> 3.1)
erubis (~> 2.7.0)
activemodel (4.1.7)
activesupport (= 4.1.7)
builder (~> 3.1)
activerecord (4.1.7)
activemodel (= 4.1.7)
activesupport (= 4.1.7)
arel (~> 5.0.0)
activesupport (4.1.7)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
acts-as-taggable-on (3.4.3)
activerecord (>= 3.2, < 5)
acts_as_commentable (4.0.2)
acts_as_votable (0.10.0)
addressable (2.3.6)
arel (5.0.1.20140414130214)
autoprefixer-rails (5.1.1)
execjs
json
bcrypt (3.1.10)
better_errors (2.1.1)
coderay (>= 1.0.0)
erubis (>= 2.6.6)
rack (>= 0.9.0)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
bootstrap-sass (3.3.3)
autoprefixer-rails (>= 5.0.0.1)
sass (>= 3.2.19)
builder (3.2.2)
carrierwave (0.10.0)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
json (>= 1.7)
mime-types (>= 1.16)
coderay (1.1.0)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.3.0)
coffee-script-source
execjs
coffee-script-source (1.9.0)
debug_inspector (0.0.2)
devise (3.4.1)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
responders
thread_safe (~> 0.1)
warden (~> 1.2.3)
devise_invitable (1.4.0)
actionmailer (>= 3.2.6, < 5)
devise (>= 3.2.0)
erubis (2.7.0)
execjs (2.2.2)
hike (1.2.3)
i18n (0.7.0)
jbuilder (2.2.6)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
jcrop-rails-v2 (0.9.12.3)
jquery-rails (3.1.2)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (5.0.3)
railties (>= 3.2.16)
json (1.8.2)
launchy (2.4.3)
addressable (~> 2.3)
letter_opener (1.3.0)
launchy (~> 2.2)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mime-types (2.4.3)
mini_magick (4.0.3)
minitest (5.5.1)
multi_json (1.10.1)
orm_adapter (0.5.0)
pg (0.17.1)
rack (1.5.2)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.1.7)
actionmailer (= 4.1.7)
actionpack (= 4.1.7)
actionview (= 4.1.7)
activemodel (= 4.1.7)
activerecord (= 4.1.7)
activesupport (= 4.1.7)
bundler (>= 1.3.0, < 2.0)
railties (= 4.1.7)
sprockets-rails (~> 2.0)
rails_12factor (0.0.2)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.4)
rails_stdout_logging (0.0.3)
railties (4.1.7)
actionpack (= 4.1.7)
activesupport (= 4.1.7)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.4.2)
rdoc (4.2.0)
json (~> 1.4)
responders (1.1.2)
railties (>= 3.2, < 4.2)
sass (3.2.19)
sass-rails (4.0.5)
railties (>= 4.0.0, < 5.0)
sass (~> 3.2.2)
sprockets (~> 2.8, < 3.0)
sprockets-rails (~> 2.0)
sdoc (0.4.1)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
spring (1.2.0)
sprockets (2.12.3)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.2.4)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
sqlite3 (1.3.10)
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
turbolinks (2.5.3)
coffee-rails
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.7.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
warden (1.2.3)
rack (>= 1.0)
will_paginate (3.0.7)
will_paginate-bootstrap (1.0.1)
will_paginate (>= 3.0.3)

PLATFORMS
ruby

DEPENDENCIES
acts-as-taggable-on
acts_as_commentable
acts_as_votable
autoprefixer-rails
better_errors
binding_of_caller
bootstrap-sass
carrierwave
coffee-rails (~> 4.0.0)
devise
devise_invitable
jbuilder (~> 2.0)
jcrop-rails-v2
jquery-rails
jquery-ui-rails
letter_opener
mini_magick
pg (= 0.17.1)
rails (= 4.1.7)
rails_12factor (= 0.0.2)
sass-rails (~> 4.0.3)
sdoc (~> 0.4.0)
spring
sqlite3
turbolinks
uglifier (>= 1.3.0)
will_paginate-bootstrap

我是 Rails 的新手,我不知道这里出了什么问题,因为 Sqlite 只用于开发而不是生产。如果有人可以帮助我,我将非常感激,我已经尝试搜索但无法找出造成这种情况的原因。谢谢!

最佳答案

Heroku 忽略开发 gem ;但是,您拼错了 development,因此 Heroku 会尝试安装 gem。

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

将其更改为:development

关于ruby-on-rails - Heroku 推送错误 "Detected sqlite3 gem which is not supported on Heroku.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28385182/

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