gpt4 book ai didi

ruby-on-rails-3 - Sqlite3 : Failed to build gem native extension

转载 作者:行者123 更新时间:2023-12-04 19:39:03 25 4
gpt4 key购买 nike

我第一次使用 Capistrano 并遇到了以下问题。我的 rails 应用程序在装有 CentOS Linux 6.0 的 VPS 上运行。

  * executing `bundle:install'
* executing "ls -x ~/my_rails_app/releases"
servers: ["example.com"]
[example.com] executing command
command finished in 1225ms
* executing "cd ~/my_rails_app/releases/20120513095446 && bundle install --gemfile ~/my_rails_app/releases/2012051309
5446/Gemfile --path ~/my_rails_app/shared/bundle --deployment --quiet --without development test"
servers: ["example.com"]
[example.com] executing command
** [out :: example.com] /usr/lib/ruby/site_ruby/1.8/rubygems/installer.rb:483:in `build_extensions': ERROR: Failed to build gem native
extension. (Gem::Installer::ExtensionBuildError)
** [out :: example.com]
** [out :: example.com] /usr/bin/ruby extconf.rb
** [out :: example.com] checking for sqlite3.h... no
** [out :: example.com] sqlite3.h is missing. Try 'port install sqlite3 +universal'
** [out :: example.com] or 'yum install sqlite-devel' and check your shared library search path (the
** [out :: example.com] location where your sqlite3 shared library is located).
** [out :: example.com] *** extconf.rb failed ***
** [out :: example.com] Could not create Makefile due to some reason, probably lack of
** [out :: example.com] necessary libraries and/or headers. Check the mkmf.log file for more
** [out :: example.com] details. You may need configuration options.
** [out :: example.com]
** [out :: example.com] Provided configuration options:
** [out :: example.com] --with-opt-dir
** [out :: example.com] --without-opt-dir
** [out :: example.com] --with-opt-include
** [out :: example.com] --without-opt-include=${opt-dir}/include
** [out :: example.com] --with-opt-lib
** [out :: example.com] --without-opt-lib=${opt-dir}/lib
** [out :: example.com] --with-make-prog
** [out :: example.com] --without-make-prog
** [out :: example.com] --srcdir=.
** [out :: example.com] --curdir
** [out :: example.com] --ruby=/usr/bin/ruby
** [out :: example.com] --with-sqlite3-dir
** [out :: example.com] --without-sqlite3-dir
** [out :: example.com] --with-sqlite3-include
** [out :: example.com] --without-sqlite3-include=${sqlite3-dir}/include
** [out :: example.com] --with-sqlite3-lib
** [out :: example.com] --without-sqlite3-lib=${sqlite3-dir}/lib
** [out :: example.com] --enable-local
** [out :: example.com] --disable-local
** [out :: example.com]
** [out :: example.com]
** [out :: example.com] Gem files will remain installed in /home/example.com/my_rails_app/shared/bundle/ruby/1.8/gems/sqlite3-1.
3.6 for inspection.
** [out :: example.com] Results logged to /home/example.com/my_rails_app/shared/bundle/ruby/1.8/gems/sqlite3-1.3.6/ext/sqlite3/g
em_make.out

有任何想法吗?
提前致谢!

最佳答案

在 Red-hat 衍生产品上,您需要安装 sqlite 的开发包,以便构建使用 native 扩展的 sqlite gem。

尝试:

sudo yum install sqlite-devel

然后做
bundle install

关于ruby-on-rails-3 - Sqlite3 : Failed to build gem native extension,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10570949/

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