On 07/07/2012 03:32 AM, Benjamin Lei wrote:
>
> Huh that's weird :/ How do I make it so that ruby installs under
> /usr/bin then?
>
> Here's what I currently do:
>
> exec { "unload-ruby":
> command => "wget
> ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p370.tar.gz >>
> /tmp/ruby.log && tar -zxf ruby-1.8.7-p370.tar.gz >> /tmp/ruby.log",
> cwd => "/tmp",
> path => "/bin:/usr/bin",
> #require => Package["ruby"],
> onlyif => "ruby -v | grep 1.8.6",
> }
>
> exec { "config-ruby":
> command => "/tmp/ruby-1.8.7-p370/configure --enable-pthread >>
> /tmp/ruby.log",
> cwd => "/tmp/ruby-1.8.7-p370",
> path => "/bin:/usr/bin",
> require => Exec["unload-ruby"],
> onlyif => "ruby -v | grep 1.8.6",
> }
>
> exec { "make-ruby":
> command => "make >> /tmp/ruby.log && make install >> /tmp/ruby.log",
> cwd => "/tmp/ruby-1.8.7-p370",
> path => "/bin:/usr/bin",
> require => Exec["config-ruby"],
> onlyif => "ruby -v | grep 1.8.6",
> }
>
>
> I'm guessing I need some option in one of these?
Yes, usually --prefix.
But if you *must* install ruby from source, you probably want to make
sure you're not overwriting files owned by the original ruby packages.
Installing to /usr/local is usually the cleaner approach.
You may want to make puppet use the correct search path instead.
HTH,
Felix
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.