遏制gem安装:捆绑安装失败,但正常gem安装可以
已解决:openvz 容器没有分配足够的内存。
我可能需要一些帮助: 我想通过捆绑器安装路边宝石。
我的配置(如果需要,请索取更多详细信息):
ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]
gem 1.8.6
Bundler version 1.0.15
Linux 2.6.32-5-openvz-amd64 #1 SMP x86_64 GNU/Linux
cat .bundle/config
---
BUNDLE_DISABLE_SHARED_GEMS: "1"
BUNDLE_PATH: vendor
正常安装有效:
gem install curb
Building native extensions. This could take a while...
Successfully installed curb-0.7.15
1 gem installed
但它无法通过捆绑程序 gem 工作:
bundle install
Fetching source index for http://rubygems.org/
Using rake (0.8.7)
Using builder (2.1.2)
Using bundler (1.0.15)
....
Installing curb (0.7.8) with native extensions /usr/local/lib/site_ruby/1.8/rubygems/installer.rb:551:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/usr/bin/ruby1.8 extconf.rb
Gem files will remain installed in /xxx/vendor/ruby/1.8/gems/curb-0.7.8 for inspection.
Results logged to /xxx/vendor/ruby/1.8/gems/curb-0.7.8/ext/gem_make.out
from /usr/local/lib/site_ruby/1.8/rubygems/installer.rb:504:in `each'
from /usr/local/lib/site_ruby/1.8/rubygems/installer.rb:504:in `build_extensions'
from /usr/local/lib/site_ruby/1.8/rubygems/installer.rb:180:in `install'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/source.rb:101:in `install'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb:78:in `preserve_paths'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/source.rb:91:in `install'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/installer.rb:58:in `run'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb:93:in `with_build_args'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/installer.rb:57:in `run'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in `each'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in `each'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/installer.rb:49:in `run'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/installer.rb:8:in `install'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/cli.rb:222:in `install'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/vendor/thor/task.rb:22:in `send'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/vendor/thor/task.rb:22:in `run'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/vendor/thor/base.rb:389:in `start'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/bin/bundle:13
from /usr/bin/bundle:19:in `load'
from /usr/bin/bundle:19
gem_make.out 仅包含一行:
cat /xxx/vendor/ruby/1.8/gems/curb-0.7.8/ext/gem_make.out
/usr/bin/ruby1.8 extconf.rb
手动运行 extconf.rb 创建 Makefile 而不会发出警告。 运行 make 也不会显示任何警告。
如果您能在这方面帮助我或提示在哪里查找错误,我将非常高兴。
谢谢
solved: the openvz container did not have enough memory assigned to it.
I could need some help:
I want to install the curb gem through bundler.
My config (please request more details if needed):
ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]
gem 1.8.6
Bundler version 1.0.15
Linux 2.6.32-5-openvz-amd64 #1 SMP x86_64 GNU/Linux
cat .bundle/config
---
BUNDLE_DISABLE_SHARED_GEMS: "1"
BUNDLE_PATH: vendor
A normal install works:
gem install curb
Building native extensions. This could take a while...
Successfully installed curb-0.7.15
1 gem installed
But it does not work via the bundler gem:
bundle install
Fetching source index for http://rubygems.org/
Using rake (0.8.7)
Using builder (2.1.2)
Using bundler (1.0.15)
....
Installing curb (0.7.8) with native extensions /usr/local/lib/site_ruby/1.8/rubygems/installer.rb:551:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/usr/bin/ruby1.8 extconf.rb
Gem files will remain installed in /xxx/vendor/ruby/1.8/gems/curb-0.7.8 for inspection.
Results logged to /xxx/vendor/ruby/1.8/gems/curb-0.7.8/ext/gem_make.out
from /usr/local/lib/site_ruby/1.8/rubygems/installer.rb:504:in `each'
from /usr/local/lib/site_ruby/1.8/rubygems/installer.rb:504:in `build_extensions'
from /usr/local/lib/site_ruby/1.8/rubygems/installer.rb:180:in `install'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/source.rb:101:in `install'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb:78:in `preserve_paths'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/source.rb:91:in `install'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/installer.rb:58:in `run'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb:93:in `with_build_args'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/installer.rb:57:in `run'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in `each'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in `each'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/installer.rb:49:in `run'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/installer.rb:8:in `install'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/cli.rb:222:in `install'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/vendor/thor/task.rb:22:in `send'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/vendor/thor/task.rb:22:in `run'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/vendor/thor/base.rb:389:in `start'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/bin/bundle:13
from /usr/bin/bundle:19:in `load'
from /usr/bin/bundle:19
gem_make.out contains only one line:
cat /xxx/vendor/ruby/1.8/gems/curb-0.7.8/ext/gem_make.out
/usr/bin/ruby1.8 extconf.rb
Running extconf.rb manualy creates the Makefile without warning.
Running make, also shows no warnings.
I would be very happy if you could help me on this or give a hint on where to look for errors.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论