capitate icon indicating copy to clipboard operation
capitate copied to clipboard

ruby.centos.install fails while attempting to install rubygems if ran as sudo

Open yacc opened this issue 16 years ago • 1 comments
trafficstars

the ruby gem install will fail with the following error if ran as sudo failed: "sh -c "sudo -p 'sudo password: ' cd /tmp/rubygems/rubygems-1.3.1 && ruby setup.rb"" on test.sensr.net cd is a built in command , should use instead:

sudo sh -c "cd /tmp/rubygems/rubygems-1.3.1 && ruby setup.rb"

yacc avatar Jul 17 '09 06:07 yacc

one way to fix that is to modify this line in "./recipes/centos/ruby.rb":
replace run_via "cd #{dir} && ruby setup.rb" by run_via "ruby -C #{dir} setup.rb"

yacc avatar Jul 17 '09 06:07 yacc