Skip to content

Instantly share code, notes, and snippets.

@kilfu0701
Created April 20, 2017 07:15
Show Gist options
  • Save kilfu0701/b911b655b8928e4a96d991676777ebd7 to your computer and use it in GitHub Desktop.
Save kilfu0701/b911b655b8928e4a96d991676777ebd7 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 ImageMagick ImageMagick-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