Skip to content

Instantly share code, notes, and snippets.

@vysakh0
Last active December 14, 2015 16:58
Show Gist options
  • Save vysakh0/5118471 to your computer and use it in GitHub Desktop.
Save vysakh0/5118471 to your computer and use it in GitHub Desktop.
This will install rbenv, a ruby version manager and ruby 2.0.0-p0 , rails in Ubuntu
/* Requirements install git and curl */
/* installing rbenv */
curl https://raw.github.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash
/* add this instead of generated stuff "PREPEND" the echo wordings to ~/.profile */
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile
echo 'eval "$(rbenv init -)"' >> ~/.profile
source ~/.profile
/* make sure it works after another login you should see something like
/home/vysakh/.rbenv/bin:/home/vysakh/.rbenv/shims:/home/vysakh/.rbenv/bin:
*/
env $PATH
/*to install sqlite and other dependencies*/
sudo apt-get install libreadline-dev libssl-dev zlib1g-dev build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev
/* for readline to make rails c along with installing ruby */
CONFIGURE_OPTS="--with-readline-dir=/usr/include/readline" rbenv install 2.0.0-p0
/* making it global */
rbenv global 2.0.0-p0
gem install bundler --no-ri --no-rdoc
/* you need to run "rbenv rehash" after every gem installation" */
rbenv rehash
/* installing rails */
gem install rails
rbenv rehash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment