Skip to content

Instantly share code, notes, and snippets.

@so77id
Last active February 11, 2019 01:52
Show Gist options
  • Save so77id/233ab69e6ca228e64bf0 to your computer and use it in GitHub Desktop.
Save so77id/233ab69e6ca228e64bf0 to your computer and use it in GitHub Desktop.
Script to install ROR 4.2 with zsh in ubuntu
sudo apt-get update
sudo apt-get install language-pack-es
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 zsh libmysqlclient-dev redis-server imagemagick
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
cd
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
exec $SHELL
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.zshrc
exec $SHELL
git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
rbenv install 2.2.3
rbenv global 2.2.3
ruby -v
echo "gem: --no-ri --no-rdoc" > ~/.gemrc
gem install bundler
git config --global color.ui true
git config --global user.name "Crowdlatam"
git config --global user.email "info@clatam.cl"
ssh-keygen -t rsa -C "info@clatam.cl"
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo ln -sf /usr/bin/nodejs /usr/local/bin/node
gem install rails -v 4.2.4
rbenv rehash
# Install our PGP key and add HTTPS support for APT
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 561F9B9CAC40B2F7
sudo apt-get install -y apt-transport-https ca-certificates
# Add our APT repository
sudo sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main > /etc/apt/sources.list.d/passenger.list'
sudo apt-get update
# Install Passenger + Nginx
sudo apt-get install -y nginx-extras passenger
# See more in https://www.phusionpassenger.com/library/walkthroughs/deploy/ruby/aws/nginx/oss/trusty/deploy_app.html
@Stylt
Copy link

Stylt commented Feb 9, 2016

love you!!

@so77id
Copy link
Author

so77id commented Feb 9, 2016

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment