Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have installed puppet 3.0.1 from the .dmg from puppetlabs. If I remove ruby 1.9.3, puppet works, but other things like my vim install (dependant plugins) do not.

According to http://docs.puppetlabs.com/guides/platforms.html#ruby-versions 1.9.3 is supported. So whats going wrong with puppet?

% uname -a
Darwin Kusanagi.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64

% which ruby
/usr/local/bin/ruby

% ruby --version
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin11.4.2]

% /usr/bin/ruby --version
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin11.0]

% brew info ruby                                                                                                                                    1 ↵
ruby: stable 1.9.3-p327, HEAD
http://www.ruby-lang.org/en/
Depends on: pkg-config, readline, gdbm, libyaml
/usr/local/Cellar/ruby/1.9.3-p327 (796 files, 17M) *
https://github.com/mxcl/homebrew/commits/master/Library/Formula/ruby.rb
==> Options
--with-tcltk
    Install with Tcl/Tk support
--with-suffix
    Suffix commands with "19"
--universal
    Build a universal binary
--with-doc
    Install documentation
==> Caveats
NOTE: By default, gem installed binaries will be placed into:
  /usr/local/Cellar/ruby/1.9.3-p327/bin

You may want to add this to your PATH.

% puppet
/usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- puppet/util/command_line (LoadError)
    from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/bin/puppet:3:in `<main>'
share|improve this question
    
1.9.1 has a lot of compatibility issues, which is why almost nobody uses it. You should get rid of it and use 1.9.2 or higher. –  Michael Hampton Dec 13 '12 at 1:35

2 Answers 2

This is why rvm (http://rvm.io) was invented. It's the only sane way to run ruby or develop ruby apps IMHO. Different rubies for different things.

share|improve this answer

Here's Puppet's support matrix for ruby versions:

http://docs.puppetlabs.com/guides/platforms.html#ruby-versions

(UPDATE after OP updated to show error messages)

Puppet has installed itself into your system Ruby library location under /usr/lib/ruby/1.8/site_ruby/, which the homebrew ruby will not look at.

The top line of /usr/bin/puppet is #!/usr/bin/env ruby which runs the first ruby in your $PATH. So you can either adjust your $PATH variable or change that line to specifically run the system ruby, a'la:

#!/usr/bin/ruby

share|improve this answer
    
Hey, thanks for that Eric. I've updated my question to reflect the latest information –  devians Dec 13 '12 at 4:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.