Skip to content

Instantly share code, notes, and snippets.

@th0j
Last active May 8, 2018 15:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save th0j/2c9a0d6224a396ff0138796fd3d20be1 to your computer and use it in GitHub Desktop.
Save th0j/2c9a0d6224a396ff0138796fd3d20be1 to your computer and use it in GitHub Desktop.
Setup shell for Jenkins CI
cd /var/lib/jenkins/workspace/rails_ci_1
ruby -v
gem install bundler
bundle install
# Install all dependencies
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev nodejs
sudo apt-get install ruby-dev
# Install rbenv
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL
# Install Ruby
rbenv install 1.9.3-p0
rbenv global 1.9.3-p0
ruby -v
gem install bundler
sudo apt-get install ruby-bundler
# Install MySQL
sudo apt-get install libmysqlclient-dev libpq-dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment