Created
June 27, 2014 09:44
-
-
Save andruby/83a49b1212ae85de20d2 to your computer and use it in GitHub Desktop.
Chef recipe to install ruby from Brightbox mirror
This file contains hidden or 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
# Install a recent version of the ruby interpreter from ppa:brightbox | |
include_recipe "apt" | |
include_recipe "build-essential" | |
# Add the brightbox ppa | |
apt_repository 'brightbox' do | |
uri 'http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu' | |
distribution node['lsb']['codename'] | |
components ['main'] | |
keyserver 'keyserver.ubuntu.com' | |
key 'C3173AA6' | |
end | |
package 'ruby2.1' | |
package 'ruby2.1-dev' | |
# Don't generate documentation when installing gems | |
file '/etc/gemrc' do | |
content 'gem: --no-document' | |
action :create_if_missing | |
end | |
# Install the bundler gem so project can use a Gemfile | |
gem_package 'bundler' | |
# typical packages needed for nokogiri | |
package 'libxslt-dev' | |
package 'libxml2-dev' | |
# default set RACK_ENV to production! | |
magic_shell_environment 'RACK_ENV' do | |
value 'production' | |
end | |
ENV['RACK_ENV'] = 'production' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment