Skip to content

Instantly share code, notes, and snippets.

@nguyenkiidu
Forked from kilfu0701/install.sh
Last active August 2, 2018 17:04
Show Gist options
  • Save nguyenkiidu/95febd7235669c28411347b25a5a0b4c to your computer and use it in GitHub Desktop.
Save nguyenkiidu/95febd7235669c28411347b25a5a0b4c to your computer and use it in GitHub Desktop.
Install ruby and rails ( CentOS 7 )
yum install -y git git-core zlib zlib-devel gcc-c++ patch readline readline-devel \
libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake \
libtool bison curl sqlite-devel mysql-devel
cd ~
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
rbenv install -v 2.3.0
cd ~/your-rails-project
rbenv local 2.3.0
gem install bundler
gem install rails -v 5.0.1
rbenv rehash
bundle install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment