所以我试图将我的 Rails 3 应用程序部署到使用 RVM 的 Red Hat Linux 服务器上,但它一直失败:
** [out :: myserver.server.com] Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
** [out :: myserver.server.com]
** [out :: myserver.server.com] /usr/local/rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb
** [out :: myserver.server.com] checking for vm_core.h... no
** [out :: myserver.server.com] checking for vm_core.h... no
** [out :: myserver.server.com] Makefile creation failed
** [out :: myserver.server.com] **************************************************************************
** [out :: myserver.server.com] No source for ruby-1.9.3-p448 provided with debugger-ruby_core_source gem.
** [out :: myserver.server.com] **************************************************************************
** [out :: myserver.server.com] *** extconf.rb failed ***
** [out :: myserver.server.com] Could not create Makefile due to some reason, probably lack of
** [out :: myserver.server.com] necessary libraries and/or headers. Check the mkmf.log file for more
** [out :: myserver.server.com] details. You may need configuration options.
** [out :: myserver.server.com]
** [out :: myserver.server.com] Provided configuration options:
** [out :: myserver.server.com] --with-opt-dir
** [out :: myserver.server.com] --without-opt-dir
** [out :: myserver.server.com] --with-opt-include
** [out :: myserver.server.com] --without-opt-include=${opt-dir}/include
** [out :: myserver.server.com] --with-opt-lib
** [out :: myserver.server.com] --without-opt-lib=${opt-dir}/lib
** [out :: myserver.server.com] --with-make-prog
** [out :: myserver.server.com] --without-make-prog
** [out :: myserver.server.com] --srcdir=.
** [out :: myserver.server.com] --curdir
** [out :: myserver.server.com] --ruby=/usr/local/rvm/rubies/ruby-1.9.3-p448/bin/ruby
** [out :: myserver.server.com] --with-ruby-dir
** [out :: myserver.server.com] --without-ruby-dir
** [out :: myserver.server.com] --with-ruby-include
** [out :: myserver.server.com] --without-ruby-include=${ruby-dir}/include
** [out :: myserver.server.com] --with-ruby-lib
** [out :: myserver.server.com] --without-ruby-lib=${ruby-dir}/lib
** [out :: myserver.server.com]
** [out :: myserver.server.com]
** [out :: myserver.server.com] Gem files will remain installed in /usr/local/www/sherry-authorize-staging/shared/bundle/ruby/1.9.1/gems/debugger-linecache-1.1.2 for inspection.
** [out :: myserver.server.com] Results logged to /usr/local/www/sherry-authorize-staging/shared/bundle/ruby/1.9.1/gems/debugger-linecache-1.1.2/ext/trace_nums/gem_make.out
** [out :: myserver.server.com] An error occurred while installing debugger-linecache (1.1.2), and Bundler
** [out :: myserver.server.com] cannot continue.
** [out :: myserver.server.com] Make sure that `gem install debugger-linecache -v '1.1.2'` succeeds before
** [out :: myserver.server.com] bundling.
所以我听了指示,并确保 gem 可以通过 SSH 连接到服务器并运行gem install debugger-linecache -v '1.1.2'
,甚至转到服务器并手动克隆 git repo 并运行 abundle install
以确保所有 gem 都存在于该服务器上。但是,即使那里有所有的宝石,每当我部署时,我仍然会收到同样的消息。我以任何用户身份登录并输入gem list
所有的宝石。这些宝石看起来也像是全球性的并且在正确的位置:
[emai@511863-web3 ~]$ which gem
/usr/local/rvm/rubies/ruby-1.9.3-p448/bin/gem
有谁知道我该如何解决这个问题?