Created
July 30, 2010 14:18
-
-
Save morgoth/500586 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
script "Install rvm" do | |
interpreter "bash" | |
user node[:app][:name] | |
code <<-EOH | |
export | |
rvm_path="${rvm_path:-$HOME/.rvm}" | |
mkdir -p $rvm_path/src/ | |
builtin cd $rvm_path/src | |
rm -rf ./rvm/ | |
git clone --depth 1 git://github.com/wayneeseguin/rvm.git | |
builtin cd $rvm_path/src/rvm | |
dos2unix scripts/* >/dev/null 2>&1 | |
bash ./scripts/install | |
source ~/.rvm/scripts/rvm | |
EOH | |
end | |
execute "Load rvm source" do | |
command %Q{. "#{paths[:home]}/.rvm/scripts/rvm"} | |
user node[:app][:name] | |
end | |
execute "Install ree 1.8.7" do | |
command "rvm install ree-1.8.7-2010.02" | |
user node[:app][:name] | |
end | |
execute "Cleanup rvm tmp files" do | |
command "rvm cleanup all" | |
user node[:app][:name] | |
end | |
execute "Set default Ruby" do | |
command "rvm use ree-1.8.7-2010.02 --default" | |
user node[:app][:name] | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---- Begin output of bash /tmp/chef-script20100730-3431-1ljsoek-0 ---- | |
STDOUT: declare -x DUPA="4" | |
declare -x EDITOR="/usr/bin/vim" | |
declare -x HOME="/root" | |
declare -x LANG="en_US.UTF-8" | |
declare -x LC_ALL="C" | |
declare -x LOGNAME="root" | |
declare -x MAIL="/var/mail/root" | |
declare -x OLDPWD | |
declare -x PATH="/usr/local/bin:/var/lib/gems/1.8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11" | |
declare -x PWD="/tmp" | |
declare -x SHELL="/bin/bash" | |
declare -x SHLVL="2" | |
declare -x SSH_CLIENT="88.198.21.171 47281 22" | |
declare -x SSH_CONNECTION="88.198.21.171 47281 10.1.1.17 22" | |
declare -x SSH_TTY="/dev/pts/0" | |
declare -x TERM="xterm" | |
declare -x USER="root" | |
declare -x _="/home/ruby/.rvm/gems/ree-1.8.7-2010.02/bin/chef-client" | |
Initialized empty Git repository in /tmp/rvm/.git/STDERR: mkdir: cannot create directory `/root': Permission denied | |
/tmp/chef-script20100730-3431-1ljsoek-0: line 4: cd: /root/.rvm/src: Permission denied | |
/tmp/chef-script20100730-3431-1ljsoek-0: line 7: cd: /root/.rvm/src/rvm: Permission denied | |
bash: ./scripts/install: No such file or directory | |
/tmp/chef-script20100730-3431-1ljsoek-0: line 10: /root/.rvm/scripts/rvm: Permission denied---- End output of bash /tmp/chef-script20100730-3431-1ljsoek-0 ---- | |
from /home/ruby/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/chef-0.8.10/bin/../lib/chef/mixin/command.rb:122:in `run_command' | |
from /home/ruby/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/chef-0.8.10/bin/../lib/chef/provider/execute.rb:49:in `action_run' | |
from /home/ruby/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/chef-0.8.10/bin/../lib/chef/provider/script.rb:37:in `action_run' | |
from /home/ruby/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/chef-0.8.10/bin/../lib/chef/runner.rb:60:in `send' | |
from /home/ruby/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/chef-0.8.10/bin/../lib/chef/runner.rb:60:in `run_action' | |
from /home/ruby/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/chef-0.8.10/bin/../lib/chef/runner.rb:114:in `converge' | |
from /home/ruby/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/chef-0.8.10/bin/../lib/chef/runner.rb:113:in `each' | |
from /home/ruby/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/chef-0.8.10/bin/../lib/chef/runner.rb:113:in `converge' | |
from /home/ruby/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/chef-0.8.10/bin/../lib/chef/resource_collection.rb:94:in `execute_each_resource' | |
from /home/ruby/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/chef-0.8.10/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in `call' | |
from /home/ruby/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/chef-0.8.10/bin/../lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block' | |
from /home/ruby/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/chef-0.8.10/bin/../lib/chef/resource_collection/stepable_iterator.rb:85:in `step' | |
from /home/ruby/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/chef-0.8.10/bin/../lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate' | |
from /home/ruby/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/chef-0.8.10/bin/../lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index' | |
from /home/ruby/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/chef-0.8.10/bin/../lib/chef/resource_collection.rb:92:in `execute_each_resource' | |
from /home/ruby/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/chef-0.8.10/bin/../lib/chef/runner.rb:91:in `converge' | |
from /home/ruby/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/chef-0.8.10/bin/../lib/chef/client.rb:319:in `converge' | |
from /home/ruby/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/chef-0.8.10/bin/../lib/chef/client.rb:89:in `run' | |
from /home/ruby/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/chef-0.8.10/bin/../lib/chef/application/client.rb:210:in `run_application' | |
from /home/ruby/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/chef-0.8.10/bin/../lib/chef/application/client.rb:202:in `loop' | |
from /home/ruby/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/chef-0.8.10/bin/../lib/chef/application/client.rb:202:in `run_application' | |
from /home/ruby/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/chef-0.8.10/bin/../lib/chef/application.rb:57:in `run' | |
from /home/ruby/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/chef-0.8.10/bin/chef-client:26 | |
from /home/ruby/.rvm/gems/ree-1.8.7-2010.02/bin/chef-client:19:in `load' | |
from /home/ruby/.rvm/gems/ree-1.8.7-2010.02/bin/chef-client:19 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment