summaryrefslogtreecommitdiff
path: root/recipes/ruby.rb
blob: 6ebd5b67cf059d043084f9170e38f5431f1f93df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
git "/usr/local/rbenv" do
  repository "https://github.com/sstephenson/rbenv.git"
end

cookbook_file "/etc/profile.d/rbenv.sh"
cookbook_file "/etc/gemrc"
directory "/usr/local/rbenv/plugins"

git "/usr/local/rbenv/plugins/ruby-build" do
  repository "https://github.com/sstephenson/ruby-build.git"
end

ruby_version = node["stronglifters"]["ruby_version"]
stronglifters_rbenv "install #{ruby_version}" do
  not_if { ::File.exist?("/usr/local/rbenv/versions/#{ruby_version}") }
end
rbenv "global #{ruby_version}"

gem "bundler"