我第一次使用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
有什么想法吗? 提前谢谢!
答案 0 :(得分:1)
在Red-hat派生词上,您需要安装sqlite的开发包,以便构建使用本机扩展的sqlite gem。
尝试:
sudo yum install sqlite-devel
然后再做
bundle install