gpt4 book ai didi

ruby-on-rails - Heroku Push - Git 推送到 Heroku 时出错

转载 作者:行者123 更新时间:2023-12-03 00:43:03 26 4
gpt4 key购买 nike

当我尝试执行 git Push 到 Heroku(git Push Heroku Master)时,出现错误。我在 cedar stack 上,我的 Gemfile 指定了 sqlite 1.3.5。这是错误:

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal'
or 'yum install sqlite-devel' and check your shared library search path (the
location where your sqlite3 shared library is located).
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
--enable-local
--disable-local
Gem files will remain installed in /tmp/build_3umr292rjcdek/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.5 for inspection.
Results logged to /tmp/build_3umr292rjcdek/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.5/ext/sqlite3/gem_make.out
An error occured while installing sqlite3 (1.3.5), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.5'` succeeds before bundling.

! !无法通过 Bundler 安装 gem。 ! ! Heroku 推送被拒绝,无法编译 Ruby/rails 应用

最佳答案

Heroku 告诉您无法在 Heroku 平台上编译 sqlite3-ruby gem。

您可能希望将 sqlite3-ruby gem 移至 Heroku 上默认未安装的组中。

gem "rails"

group :development, :test do
gem "sqlite3-ruby", :require => "sqlite3"
end

group :production do
gem "pg"
end
<小时/>

更新:看来 gem sqlite3-ruby 是旧的,而 sqlite3 是您应该使用的新 gem。

关于ruby-on-rails - Heroku Push - Git 推送到 Heroku 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10050770/

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