rbenv installer script (Notes imo, RVM is an all in one package, and is easier))
Closed this issue · 3 comments
NullVoxPopuli commented
basically, just re-implementing everything RVM does:
#!/bin/bash
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
# Ability to install / build rubies
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
# Ability to have gemsets
git clone git://github.com/jf/rbenv-gemset.git $HOME/.rbenv/plugins/rbenv-gemset
# Setting defaults
rbenv install 2.3.1
rbenv global 2.3.1
# disable gem docs
echo "gem: --no-document" > ~/.gemrc
gem install bundler
Sidenote:
to get all the above functionality with rvm:
\curl -sSL https://get.rvm.io | bash -s stable --ruby
RVM benefits:
- built in installer
- pre-compiled rubies (faster installs)
- built in gemset
- built in changing ruby version on
cd
- easily test against multiple rubies at once
Differences
Task | RVM | rbenv |
---|---|---|
create .ruby-version |
rvm --create --ruby-version ruby-2.3.1@my-gemset # or echo 2.3.1 > .ruby-version echo my-gemset > .ruby-gemset |
rbenv local 2.3.1 |
Installing new Ruby | rvm install 2.3.1(will use pre-built binaries if available) |
rbenv install 2.3.1(always builds from source) |
NullVoxPopuli commented
AND chruby...
wget -O chruby-0.3.9.tar.gz https://github.com/postmodern/chruby/archive/v0.3.9.tar.gz
tar -xzvf chruby-0.3.9.tar.gz
cd chruby-0.3.9/
sudo make install
sudo ./scripts/setup.sh
wget -O ruby-install-0.6.0.tar.gz https://github.com/postmodern/ruby-install/archive/v0.6.0.tar.gz
tar -xzvf ruby-install-0.6.0.tar.gz
cd ruby-install-0.6.0/
sudo make install
sudo ./sscript/setup.sh
NullVoxPopuli commented
NullVoxPopuli commented
now using frum
which is a rust based ruby version manager