Commit 241cae9

mo khan <mo@mokhan.ca>
2015-12-26 03:58:58
upgrade to ruby 2.3.0
1 parent 10c9e49
config/chef_apply.rb
@@ -102,13 +102,14 @@ git "/usr/local/rbenv/plugins/ruby-build" do
   repository "https://github.com/sstephenson/ruby-build.git"
 end
 
+ruby_version = `cat .ruby-version`.strip
 bash "install_ruby" do
   user "root"
-  not_if { ::Dir.exist?("/usr/local/rbenv/versions/2.2.4") }
+  not_if { ::Dir.exist?("/usr/local/rbenv/versions/#{ruby_version}") }
   code <<-EOH
 source /etc/profile.d/rbenv.sh
-rbenv install 2.2.4
-rbenv global 2.2.4
+rbenv install #{ruby_version}
+rbenv global #{ruby_version}
 EOH
 end
 
config/deploy.rb
@@ -38,7 +38,7 @@ else
   set :ssh_options, forward_agent: true
 end
 set :rbenv_type, :system
-set :rbenv_ruby, "2.2.4"
+set :rbenv_ruby, `cat .ruby-version`.strip
 
 namespace :deploy do
   task :restart do
.ruby-version
@@ -0,0 +1,1 @@
+2.3.0
Gemfile
@@ -1,5 +1,4 @@
 source 'https://rubygems.org'
-ruby '2.2.4'
 
 gem 'bcrypt', '~> 3.1.7'
 gem 'chartkick'