Created
April 20, 2017 07:15
-
-
Save kilfu0701/b911b655b8928e4a96d991676777ebd7 to your computer and use it in GitHub Desktop.
Install ruby and rails ( CentOS 7 )
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
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