Created
July 3, 2014 08:17
-
-
Save ffaerber/6a5020d70d91a082cea7 to your computer and use it in GitHub Desktop.
ruby build chef
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
include_recipe 'ruby_build' | |
file "/etc/gemrc" do | |
content <<-EOS | |
install: --no-rdoc --no-ri | |
update: --no-rdoc --no-ri | |
EOS | |
owner "root" | |
mode 0644 | |
end | |
ruby_build_ruby node[:rails_app][:ruby_version] do | |
prefix_path "/usr/local/ruby/ruby-#{node[:rails_app][:ruby_version]}" | |
action :install | |
end | |
gem_package 'bundler' do | |
gem_binary "/usr/local/ruby/ruby-#{node[:rails_app][:ruby_version]}/bin/gem" | |
end | |
['ruby', 'gem', 'bundle'].each do |bin| | |
link "/usr/local/bin/#{bin}" do | |
to "/usr/local/ruby/ruby-#{node[:rails_app][:ruby_version]}/bin/#{bin}" | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment