Created
February 21, 2013 20:03
-
-
Save ankurcha/5007712 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
source _variables.sh | |
### stage bosh_ruby | |
apt-get -y update | |
apt-get -y autoremove | |
apt-get -y install build-essential libssl-dev libcurl4-openssl-dev libreadline-gplv2-dev zlib1g-dev libxslt1-dev libxml2-dev | |
# install ruby | |
pushd /tmp | |
[ ! -f "ruby-1.9.3-p385.tar.gz" ] && wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p385.tar.gz | |
tar zxf ruby-1.9.3-p385.tar.gz | |
cd ruby-1.9.3-p385 | |
./configure --prefix=$bosh_dir --disable-install-doc --enable-pthread --enable-shared | |
make && make install | |
popd | |
pushd $bosh_dir/ext/openssl | |
$bosh_dir/bin/ruby extconf.rb | |
make && make install | |
popd | |
pushd $bosh_dir/ext/readline | |
$bosh_dir/bin/ruby extconf.rb | |
make && make install | |
popd | |
pushd /tmp | |
[ ! -f "rubygems-1.8.24.tgz" ] && wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.24.tgz | |
tar zxf rubygems-1.8.24.tgz | |
cd rubygems-1.8.24 | |
$bosh_dir/bin/ruby setup.rb --no-format-executable | |
popd | |
echo "PATH=$bosh_dir/bin:$PATH" > /etc/environment | |
source /etc/environment | |
$bosh_dir/bin/gem update --system --no-ri --no-rdoc | |
mkdir -p $bosh_dir/etc | |
echo "gem: --no-rdoc --no-ri" >> $bosh_dir/etc/gemrc | |
#Install gems | |
$bosh_dir/bin/gem install bundler --no-ri --no-rdoc | |
$bosh_dir/bin/gem update --system |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment