Chef problem with REALLY_GEM_UPDATE_SYSTEM
Today I found following error while bootstrapping a new chef client machine:
72.2.xxx.yyy ERROR: While executing gem ... (RuntimeError)
72.2.xxx.yyy gem update --system is disabled on Debian, because it will overwrite the content of the rubygems Debian package, and might break your Debian system in subtle ways. The Debian-supported way to update rubygems is through apt-get, using Debian official repositories.
72.2.xxx.yyy If you really know what you are doing, you can still update rubygems by setting the REALLY_GEM_UPDATE_SYSTEM environment variable, but please remember that this is completely unsupported by Debian.
72.2.xxx.yyy
72.2.xxx.yyy GET http://rubygems.org/latest_specs.4.8.gz
72.2.xxx.yyy
72.2.xxx.yyy 302 Moved Temporarily
72.2.xxx.yyy
It's clearly a weird behaviour that happens when following componentes are mixed: Chef, Ubuntu 12.04, Ruby 1.9.
To solve it, I made this modification on my ubuntu's bootstrap file:
--- ubuntu12.04_ruby1.9.1_bootstrap_PRE.erb 2013-05-22 14:00:28.260592253 +0000
+++ ubuntu12.04_ruby1.9.1_bootstrap.erb 2013-05-22 13:22:46.653543721 +0000
@@ -6,11 +6,11 @@
-gem update --system gem update --system --no-rdoc --no-ri
+REALLY_GEM_UPDATE_SYSTEM=yes sudo -E gem update --system gem update --system --no-rdoc --no-ri
Enjoy and share :)
Written by Boris Quiroz
Related protips
2 Responses
Could you some detailed information?
over 1 year ago
·
@maksadbek hi, what kind of detailed information de you need? I just passed a variable before running gem update
on a Debian-like system.
Let me know if I wasn't clear enough.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#