On Sun, Feb 19, 2012 at 1:30 PM, Peter Berghold <salty.cowdawg@gmail.com>
wrote:> "The nice thing about standards is that there are so many to choose
from."
> -- Andrew S Tannenbaum
>
> Debian does wonky things when you install a gem from "gem
install." Usually
> this isn''t a problem unless there are executables to consider.
>
> I am running into that very thing with the "puppet-module" script
on my
> laptop which runs a flavor of Debian.
>
> I thought I could get away with just setting my path to point to the bin
> directory but no such luck. I get:
>
> puppet-module --help
>
/var/lib/gems/1.9.1/gems/puppet-module-0.3.4/bin/../lib/puppet/module/tool.rb:84:in
> `require'': no such file to load -- rubygems (LoadError)
> from
>
/var/lib/gems/1.9.1/gems/puppet-module-0.3.4/bin/../lib/puppet/module/tool.rb:84
> from
/var/lib/gems/1.9.1/gems/puppet-module-0.3.4/bin/puppet-module:5:in
> `require''
> from /var/lib/gems/1.9.1/gems/puppet-module-0.3.4/bin/puppet-module:5
>
>
> I''m sure I''m not the first to run into this.. Any
thoughts out there?
That''s interesting. It looks like you''re using ruby1.9.2 on a
Squeeze
box, correct me if I''m wrong. Now, Debian Squeeze considers all gem
components--including executable files--to be _state_, so it packs
them away into /var/lib/ as you see. Now, for preliminaries, make sure
you have ruby all installed:
# aptitude install ruby1.9.1 rubygems1.9.1
# aptitude install ruby1.9.1-dev build-essential libssl-dev
You''ll want to use the alternatives system to get all the executable
files you care about into a sane place. Read more in
update-alternatives (8), but:
# update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby1.9.1 400 \
--slave /usr/share/man/man1/ruby.1.gz ruby.1.gz
/usr/share/man/man1/ruby1.9.1.1.gz \
--slave /usr/bin/irb irb /usr/bin/irb1.9.1 \
--slave /usr/bin/gem gem /usr/bin/gem1.9.1
Now your /usr/bin/gems and /usr/bin/ruby _should_ be the versions you
expect. If you''ve already installed puppet-module via gem
# gem install puppet-module
You can now use the same update-alternatives tool to get it into the
normal PATH. Something like
# update-alternatives --install /usr/bin/puppet-module
puppet-module /var/lib/gems/1.9.1/gems/puppet-module-0.3.4/bin/puppet-module
Hopefully you can invoke /usr/bin/puppet-module now without error. Let
me know if that''s not correct.
> --
> Peter L. Berghold
> Owner, Shark River Technical Solutions LLC
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
--
Brian L. Troutwine
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.