0

我第一次使用 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

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

4

1 回答 1

1

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

尝试:

sudo yum install sqlite-devel

然后做

bundle install
于 2012-05-14T04:44:29.963 回答