Skip to content

Instantly share code, notes, and snippets.

@rajanand02
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rajanand02/2ba9ebf3814700009d92 to your computer and use it in GitHub Desktop.
Save rajanand02/2ba9ebf3814700009d92 to your computer and use it in GitHub Desktop.

##login as sudo user su ###then enter password

remove pre-installed ruby

yum remove ruby

check ruby was uninstalled successfully

ruby -v

output must be "ruby command not found"

install required binaries

yum install git-core curl make bzip2 gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel libxslt-devel sqlite sqlite-devel openssl openssl-devel

install nodejs

yum install nodejs

Install rvm(ruby version manager)

\curl -sSL https://get.rvm.io | bash -s stable --rails

###if it throws GPG key error, enter the following command then again try running the above curl command

curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -

Refresh the shell or open a new terminal tab

ctl+shift+t

##login as sudo user

Install latest ruby using rvm

rvm install 2.2.0

Use latest ruby as default

rvm use 2.2.0 --default

Check ruby installation

ruby -v

output must be : ruby 2.2.0p0

Give student user the access to install gems

sudo chown -R student:student /usr/local/rvm/

Exit sudo user

exit

##Remove documents for gems

echo "gem: --no-rdoc --no-ri" >> ~/.gemrc

Install bundler, rails and other gems

gem install bundler rails devise bootstrap-sass

##Check rails installation

rails -v

output must be :Rails 4.2.0

##Test by creating a sample application

rails new sample_app

cd sample_app

start the rails server

rails server

go to http://localhost:3000 in browser to see rails welcome page

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