Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 141 lines (107 sloc) 4.669 kb
fca4a29 @wayneeseguin Feature: 'rvm notes' now outputs the same notes as spit out during rv…
wayneeseguin authored
1 #!/usr/bin/env bash
2
3 system="$(uname)"
4
5 if [[ "Linux" = "$system" ]] ; then
b23b68b @wayneeseguin Tweaked notes to include release name on Linux.
wayneeseguin authored
6 for file in /etc/*-release ; do
7 release="( $(cat $file) )" ; break
8 done
6c80eed @wayneeseguin Arrays make me feel shifty... Disco Fever!
wayneeseguin authored
9 printf "\n\nNotes for ${system} $release\n"
b23b68b @wayneeseguin Tweaked notes to include release name on Linux.
wayneeseguin authored
10
d8ae2ae @wayneeseguin Added ncurses-dev to ruby dependencies on apt based systems.
wayneeseguin authored
11 rvm_apt_binary="$(command -v aptitude || command -v apt-get)"
680aa55 @wayneeseguin s/which/POSIX command -v/g
wayneeseguin authored
12 rvm_emerge_binary="$(command -v emerge)"
13 rvm_pacman_binary="$(command -v pacman)"
14 rvm_yum_binary="$(command -v yum)"
fca4a29 @wayneeseguin Feature: 'rvm notes' now outputs the same notes as spit out during rv…
wayneeseguin authored
15
1cd1620 @wayneeseguin '1.8.7@rvm-site gem env gemdir' works as expected
wayneeseguin authored
16 printf "
aac5c28 @wayneeseguin Tweaked rvm notes output for clarity.
wayneeseguin authored
17 NOTE: 'ruby' represents Matz's Ruby Interpreter (MRI) (1.8.X, 1.9.X)
b615c60 @wayneeseguin Tweaked rvm notes a bit more
wayneeseguin authored
18 This is the *original* / standard Ruby Language Interpreter
aac5c28 @wayneeseguin Tweaked rvm notes output for clarity.
wayneeseguin authored
19 'ree' represents Ruby Enterprise Edition
20 'rbx' represents Rubinius
21
22 bash >= 3.2 is required
23 curl is required
24 git is required (>= 1.7 recommended)
25 patch is required (for ree and some ruby-head's).
26
27 If you wish to install rbx and/or Ruby 1.9 head (MRI) (eg. 1.9.2-head),
28 then you must install and use rvm 1.8.7 first.
29
30 If you wish to have the 'pretty colors' again,
31 set 'export rvm_pretty_print_flag=1' in ~/.rvmrc.
1cd1620 @wayneeseguin '1.8.7@rvm-site gem env gemdir' works as expected
wayneeseguin authored
32 "
0b651e4 @wayneeseguin Added an extra line detailing what MRI/ree/rbx stand for to notes, th…
wayneeseguin authored
33
d8ae2ae @wayneeseguin Added ncurses-dev to ruby dependencies on apt based systems.
wayneeseguin authored
34 if [[ ! -z "$rvm_apt_binary" ]] ; then
1cd1620 @wayneeseguin '1.8.7@rvm-site gem env gemdir' works as expected
wayneeseguin authored
35 printf "
36 dependencies:
37 # For RVM
48d8449 @semperos Change git-core to git; git-core now deprecated in Ubuntu repo
semperos authored
38 rvm: bash curl git
ec3e57f @wayneeseguin Added zlib1g to rvm notes for apt hosts.
wayneeseguin authored
39
aac5c28 @wayneeseguin Tweaked rvm notes output for clarity.
wayneeseguin authored
40 # For Ruby (MRI & ree) you should install the following OS dependencies:
d8ae2ae @wayneeseguin Added ncurses-dev to ruby dependencies on apt based systems.
wayneeseguin authored
41 ruby: ${rvm_apt_binary} install 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
aac5c28 @wayneeseguin Tweaked rvm notes output for clarity.
wayneeseguin authored
42
b43772d @wayneeseguin Adjusted rvm notes for JRuby on aptitude hosts.
wayneeseguin authored
43 # For JRuby (if you wish to use it) you will need:
d8ae2ae @wayneeseguin Added ncurses-dev to ruby dependencies on apt based systems.
wayneeseguin authored
44 jruby: ${rvm_apt_binary} install curl g++ openjdk-6-jre-headless
45 jruby-head: ${rvm_apt_binary} install ant openjdk-6-jdk
b43772d @wayneeseguin Adjusted rvm notes for JRuby on aptitude hosts.
wayneeseguin authored
46
4a69e53 @wayneeseguin Added libyaml-dev to ruby deps on Ubantos.
wayneeseguin authored
47 # In addition to ruby: dependencies,
48 ruby-head: subversion
1cd1620 @wayneeseguin '1.8.7@rvm-site gem env gemdir' works as expected
wayneeseguin authored
49
50 # For IronRuby (if you wish to use it) you will need:
d8ae2ae @wayneeseguin Added ncurses-dev to ruby dependencies on apt based systems.
wayneeseguin authored
51 ironruby: ${rvm_apt_binary} install curl mono-2.0-devel
1cd1620 @wayneeseguin '1.8.7@rvm-site gem env gemdir' works as expected
wayneeseguin authored
52 "
fca4a29 @wayneeseguin Feature: 'rvm notes' now outputs the same notes as spit out during rv…
wayneeseguin authored
53
54 elif [[ ! -z "$rvm_emerge_binary" ]] ; then
1cd1620 @wayneeseguin '1.8.7@rvm-site gem env gemdir' works as expected
wayneeseguin authored
55 printf "
56 dependencies:
57 # For RVM
58 rvm: bash curl git
59
60 # For MRI based rubies you will need:
4a8c768 @yura don't need to emerge libxml since it's ruby package in gentoo and req…
yura authored
61 ruby: emerge libiconv readline zlib openssl curl git libyaml sqlite libxslt
4f8e589 @wayneeseguin Added emerge line for notes.
wayneeseguin authored
62 ruby-head: gcc bison autoconf automake m4
1cd1620 @wayneeseguin '1.8.7@rvm-site gem env gemdir' works as expected
wayneeseguin authored
63
64 # For JRuby (if you wish to use it) you will need:
65 jruby: emerge dev-java/sun-jdk dev-java/sun-jre-bin
ec3e57f @wayneeseguin Added zlib1g to rvm notes for apt hosts.
wayneeseguin authored
66
1cd1620 @wayneeseguin '1.8.7@rvm-site gem env gemdir' works as expected
wayneeseguin authored
67 # For IronRuby (if you wish to use it) you will need:
68 ironruby: emerge dev-lang/mono
69 "
fca4a29 @wayneeseguin Feature: 'rvm notes' now outputs the same notes as spit out during rv…
wayneeseguin authored
70
71 elif [[ ! -z "$rvm_pacman_binary" ]] ; then
1cd1620 @wayneeseguin '1.8.7@rvm-site gem env gemdir' works as expected
wayneeseguin authored
72 printf "
73 dependencies:
74 # For RVM itself
75 rvm: bash curl git
b37ad15 @wayneeseguin Updated ArchLinux MRI deps.
wayneeseguin authored
76
aac5c28 @wayneeseguin Tweaked rvm notes output for clarity.
wayneeseguin authored
77 # For Ruby (MRI & Ree) you should install the following OS dependencies:
c136c25 @wayneeseguin What, you mean you actually want to compile something???
wayneeseguin authored
78 ruby: pacman -Sy --noconfirm gcc patch curl bison zlib readline libxml2 libxslt git autoconf diffutils patch bison make
4a69e53 @wayneeseguin Added libyaml-dev to ruby deps on Ubantos.
wayneeseguin authored
79 ruby-head: pacman -Sy --noconfirm subversion
ec3e57f @wayneeseguin Added zlib1g to rvm notes for apt hosts.
wayneeseguin authored
80
1cd1620 @wayneeseguin '1.8.7@rvm-site gem env gemdir' works as expected
wayneeseguin authored
81 # For JRuby (if you wish to use it) you will need:
82 jruby: pacman -Sy --noconfirm jdk jre curl
83
84 # For IronRuby (if you wish to use it) you will need:
85 ironruby: pacman -Sy --noconfirm mono
86 "
fca4a29 @wayneeseguin Feature: 'rvm notes' now outputs the same notes as spit out during rv…
wayneeseguin authored
87
88 elif [[ ! -z "$rvm_yum_binary" ]] ; then
1cd1620 @wayneeseguin '1.8.7@rvm-site gem env gemdir' works as expected
wayneeseguin authored
89 printf "
90 dependencies:
91 # For RVM
92 rvm: yum install -y bash curl git
93
aac5c28 @wayneeseguin Tweaked rvm notes output for clarity.
wayneeseguin authored
94 # For Ruby (MRI & Ree) you should install the following OS dependencies:
25ff362 @wayneeseguin Added openssl-devel to yum distro notes.
wayneeseguin authored
95 ruby: yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel ;
1cd1620 @wayneeseguin '1.8.7@rvm-site gem env gemdir' works as expected
wayneeseguin authored
96 yum install -y iconv-devel # NOTE: For centos 5.4 final iconv-devel might not be available :(
ec3e57f @wayneeseguin Added zlib1g to rvm notes for apt hosts.
wayneeseguin authored
97
1cd1620 @wayneeseguin '1.8.7@rvm-site gem env gemdir' works as expected
wayneeseguin authored
98 # For JRuby (if you wish to use it) you will need:
99 jruby: yum install -y java
100 "
fca4a29 @wayneeseguin Feature: 'rvm notes' now outputs the same notes as spit out during rv…
wayneeseguin authored
101
102 else
1cd1620 @wayneeseguin '1.8.7@rvm-site gem env gemdir' works as expected
wayneeseguin authored
103 printf "
104 dependencies:
105 # RVM
106 rvm: bash curl git
107
aac5c28 @wayneeseguin Tweaked rvm notes output for clarity.
wayneeseguin authored
108 # For Ruby (MRI & Ree) you should install the following OS dependencies:
1cd1620 @wayneeseguin '1.8.7@rvm-site gem env gemdir' works as expected
wayneeseguin authored
109 ruby: # gcc-c++ patch readline zlib libyaml iconv libxml2 libxslt
110
111 # For JRuby (if you wish to use it) you will need:
aac5c28 @wayneeseguin Tweaked rvm notes output for clarity.
wayneeseguin authored
112 jruby: # The SUN java runtime environment and development kit.
1cd1620 @wayneeseguin '1.8.7@rvm-site gem env gemdir' works as expected
wayneeseguin authored
113
114 # For IronRuby (if you wish to use it) you will need:
115 ironruby: #The Mono Runtime and Development Platform (version 2.6 or greater is recommended).
116 "
fca4a29 @wayneeseguin Feature: 'rvm notes' now outputs the same notes as spit out during rv…
wayneeseguin authored
117 fi
118 elif [[ "Darwin" = "$system" ]] ; then
1cd1620 @wayneeseguin '1.8.7@rvm-site gem env gemdir' works as expected
wayneeseguin authored
119
b23b68b @wayneeseguin Tweaked notes to include release name on Linux.
wayneeseguin authored
120 release="( $(sw_vers -productName) )"
1cd1620 @wayneeseguin '1.8.7@rvm-site gem env gemdir' works as expected
wayneeseguin authored
121
122 printf "
123 Notes for ${system} $release
aac5c28 @wayneeseguin Tweaked rvm notes output for clarity.
wayneeseguin authored
124 For Snow Leopard be sure to have Xcode Tools Version 3.2.1 (1613) or later
125 You should download the latest Xcode tools from developer.apple.com.
126 (This is since the dvd install for Snow Leopard contained bugs).
127
128 If you intend on installing MacRuby you must install LLVM first.
129 If you intend on installing JRuby you must install the JDK.
130 If you intend on installing IronRuby you must install Mono (version 2.6 or greater is recommended).
b3faa89 @billgathen Added instructions for abandoning Snow Leopard system ruby.
billgathen authored
131
132 To seamlessly abandon the Apple-installed system ruby (ruby 1.8.7 patchlevel 174 for Snow Leopard):
133
134 rvm install 1.8.7 # installs patch 302: closest supported version
135 rvm system ; rvm gemset export system.gems ; rvm 1.8.7 ; rvm gemset import system # migrate your gems
136 rvm --default 1.8.7
1cd1620 @wayneeseguin '1.8.7@rvm-site gem env gemdir' works as expected
wayneeseguin authored
137 "
fca4a29 @wayneeseguin Feature: 'rvm notes' now outputs the same notes as spit out during rv…
wayneeseguin authored
138 fi
139
0f7cb8b @wayneeseguin More tweaks to install message.
wayneeseguin authored
140 echo
Something went wrong with that request. Please try again.