-
-
Save mystix/3885101 to your computer and use it in GitHub Desktop.
rbenv system-wide installation on Debian Squeeze
This file contains hidden or 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
| #!/bin/bash | |
| aptitude update | |
| aptitude -y install build-essential git-core zlib1g-dev libssl-dev libreadline6-dev | |
| # rubygems: skip ri and rdoc on production server | |
| echo '--- | |
| :sources: | |
| - http://gems.rubyforge.org | |
| - http://gems.github.com | |
| gem: --no-ri --no-rdoc | |
| ' >> ~/.gemrc | |
| # rbenv: per-user install | |
| echo '# rbenv per-user install | |
| if [ -z "$(type rbenv 2> /dev/null | head -1 | grep function)" ]; then | |
| export RBENV_ROOT=/usr/local/rbenv | |
| export PATH=$RBENV_ROOT/bin:$PATH | |
| [[ -e "$RBENV_ROOT/bin/rbenv" ]] && eval "$(rbenv init -)" | |
| fi' >> ~/.bashrc | |
| # install Ruby 1.9.3 | |
| CONFIGURE_OPTS="--with-readline-dir=/usr/include/readline" rbenv install 1.9.3-p327 | |
| rbenv global 1.9.3-p327 | |
| # rehash | |
| rbenv rehash | |
| # restart shell | |
| exec $SHELL |
This file contains hidden or 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
| #!/bin/bash | |
| aptitude update | |
| aptitude -y install build-essential git-core zlib1g-dev libssl-dev libreadline6-dev | |
| # rubygems: skip ri and rdoc on production server | |
| echo '--- | |
| :sources: | |
| - http://gems.rubyforge.org | |
| - http://gems.github.com | |
| gem: --no-ri --no-rdoc | |
| ' >> ~/.gemrc | |
| # rbenv system-wide install | |
| git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
| git clone git://github.com/sstephenson/ruby-build.git /usr/local/rbenv/plugins/ruby-build | |
| echo '# rbenv system-wide install | |
| export RBENV_ROOT=/usr/local/rbenv | |
| export PATH=$RBENV_ROOT/bin:$PATH | |
| [[ -e "$RBENV_ROOT/bin/rbenv" ]] && eval "$(rbenv init -)" | |
| ' >> /etc/profile.d/rbenv.sh | |
| ln -s /usr/local/rbenv/completions/rbenv.bash /etc/bash_completion.d/rbenv | |
| # load rbenv | |
| source /etc/profile.d/rbenv.sh | |
| # install Ruby 1.9.3 | |
| CONFIGURE_OPTS="--with-readline-dir=/usr/include/readline" rbenv install 1.9.3-p327 | |
| rbenv global 1.9.3-p327 | |
| # rehash | |
| rbenv rehash | |
| # restart shell | |
| exec $SHELL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment