elliottcable (owner)

Fork Of

gist: 59130 by postmodern Simple shell script that do...

Forks

Revisions

gist: 59216 Download_button fork
public
Description:
This is a script to install both ruby 1.8.7 and 1.9.1, with suffixed binaries and symlinks
Public Clone URL: git://gist.github.com/59216.git
Embed All Files: show embed
build_ruby19.sh #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# This is a script to install both ruby 1.8.7 and 1.9.1, with suffixed binaries and symlinks
 
mkdir -p /usr/local/src ; cd /usr/local/src
wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p160.tar.bz2
tar -xjvf ruby-1.8.7-p160.tar.bz2
cd ruby-1.8.7-p160
./configure --prefix=/usr --program-suffix=18 --enable-shared
make && sudo make all install
 
cd /usr/local/src
wget http://de.mirror.rubyforge.org/rubygems/rubygems-1.3.2.tgz
tar -xzvf rubygems-1.3.2.tgz
cd rubygems-1.3.2
sudo /usr/bin/ruby18 setup.rb --vendor
sudo /usr/bin/gem18 update --system
 
cd /usr/local/src
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p0.tar.bz2
tar -xjvf ruby-1.9.1-p0.tar.bz2
cd ruby-1.9.1-p0
./configure --prefix=/usr --program-suffix=19 --enable-shared
make && sudo make all install
 
cd /usr/bin
binaries=( erb gem irb rdoc ri ruby testrb )
for binary in ${binaries[@]}; do
sudo mv ${binary}{,~} # Just in case
  sudo ln -s $(pwd)/${binary}19 $(pwd)/${binary}
done