Sunday, February 23, 2014

install latest ruby and chef-solo

1, remove all old ruby
apt-get remove ruby1.9.1
apt-get remove ruby1.8
apt-get --purge remove ruby-rvm
rm -rf /usr/share/ruby-rvm /etc/rvmrc /etc/profile.d/rvm.sh

2, install rvm
\curl -L https://get.rvm.io | bash -s stable --ruby --autolibs=enable --auto-dotfiles
source /usr/local/rvm/scripts/rvm
ruby -v

IF you see this issue "The program 'rails' is currently not installed."
you need to restart your terminal

rvm install ruby

3, install chef using gem install, NOT "curl -L https://www.opscode.com/chef/install.sh | bash"
gem install rails
gem install chef
chef-solo -v

No comments:

Post a Comment