Last active
August 29, 2015 14:06
-
-
Save ealden/18123ae72f3b0a4f52f4 to your computer and use it in GitHub Desktop.
Ruby install in CentOS 6.5
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
# Install required packages in CentOS 6 | |
# This should be run as root | |
yum install gcc make zlib zlib-devel readline-devel openssl-devel git | |
# Install rbenv | |
# This should be run as a non-root user | |
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
source ~/.bash_profile | |
# Install ruby-build | |
# This should be run as a non-root user | |
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
# Install latest Ruby and set it as global | |
# This should be run as a non-root user | |
rbenv install 2.1.3 | |
rbenv global 2.1.3 | |
# Install bundler as we always need it | |
# This should be run as a non-root user | |
gem install bundler |
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
# Install required packages for nokogiri | |
# This should be run as root | |
yum install libxml2-devel libxslt-devel | |
# CentOS 6.5 has an older version of libxml2 which causes `gem install nokogiri` to fail | |
# We set Bundler to use the system libraries when compiling Nokogiri | |
# This should be run as a non-root user | |
bundle config build.nokogiri "--use-system-libraries" |
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
# root: Install required packages for pg | |
# For PostgreSQL 9.3 | |
# This should be run as root | |
yum install postgresql93-devel |
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
# Install required packages for therubyracer | |
# This is necessary if your app has ActionView/Sprockets | |
# This should be run as root | |
yum install gcc-c++ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment