Skip to content

Instantly share code, notes, and snippets.

@sgzijl
Created April 24, 2014 11:51
Show Gist options
  • Save sgzijl/11251767 to your computer and use it in GitHub Desktop.
Save sgzijl/11251767 to your computer and use it in GitHub Desktop.
## Ruby 2.0.0 p451 own package
[root@management ~]# which ruby
/usr/local/puppet/bin/ruby
[root@management ~]# which gem
/usr/local/puppet/bin/gem
## Installing manually works
# export HOMEGEMS="$(ruby -rubygems -e 'puts Gem.user_dir')"
# export OLDPATH="$PATH"
# export PATH="${HOMEGEMS}/bin:${PATH}"
# gem install --user-install --no-rdoc --no-ri ruby-shadow ruby-augeas
Building native extensions. This could take a while...
Successfully installed ruby-shadow-2.3.3
Building native extensions. This could take a while...
Successfully installed ruby-augeas-0.5.0
2 gems installed
## User-installing gems
gem install --user-install --no-rdoc --no-ri --version 3.4.3 puppet
gem install --user-install --no-rdoc --no-ri deep_merge hiera-eyaml kwalify ruby-shadow ruby-augeas puppet-lint librarian-puppet rspec-puppet json rake rdoc bundler
find ${HOMEGEMS}/cache -name "*.gem" -exec fpm -f -s gem -t rpm --gem-package-name-prefix puppet-ruby-rubygem {} \;
# Packaging GEM's work for everything, but ruby-shadow and ruby-augeas. Perhaps due to native extensions?
# Fail example:
[root@management ~]# find ${HOMEGEMS}/cache -name "ruby-shadow*.gem" -exec fpm -f -s gem -t rpm --gem-package-name-prefix puppet-ruby-rubygem {} \;
Process failed: gem failed (exit code 1). Full command was:["gem", "install", "--quiet", "--no-ri", "--no-rdoc", "--install-dir", "/tmp/package-gem-staging20140424-15127-17wtudf/usr/local/puppet/lib/ruby/gems/2.0.0", "--ignore-dependencies", "-E", "--bindir", "/tmp/package-gem-staging20140424-15127-17wtudf/usr/local/puppet/bin", "/root/.gem/ruby/2.0.0/cache/ruby-shadow-2.3.3.gem"] {:level=>:error}
@sgzijl
Copy link
Author

sgzijl commented Apr 24, 2014

~/.gem/ruby/2.0.0/gems/ruby-shadow-2.3.3/mkmf.log contains:
have_library: checking for getspent() in -lshadow... -------------------- no

about to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment