Merge branch 'master' into 6663-git-server
[arvados.git] / doc / _includes / _install_ruby_and_bundler.liquid
1 Currently, only Ruby 2.1 is supported.
2
3 h4(#rvm). *Option 1: Install with RVM*
4
5 <notextile>
6 <pre><code><span class="userinput">sudo gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
7 \curl -sSL https://get.rvm.io | sudo bash -s stable --ruby=2.1
8 sudo adduser "$USER" rvm
9 </span></code></pre></notextile>
10
11 Either log out and log back in to activate RVM, or explicitly load it in all open shells like this:
12
13 <notextile>
14 <pre><code><span class="userinput">source /usr/local/rvm/scripts/rvm
15 </span></code></pre></notextile>
16
17 Once RVM is activated in your shell, install Bundler:
18
19 <notextile>
20 <pre><code>~$ <span class="userinput">gem install bundler</span>
21 </code></pre></notextile>
22
23 h4(#fromsource). *Option 2: Install from source*
24
25 Install prerequisites for Debian 7 or 8:
26
27 <notextile>
28 <pre><code><span class="userinput">sudo apt-get install \
29     bison build-essential gettext libcurl3 libcurl3-gnutls \
30     libcurl4-openssl-dev libpcre3-dev libreadline-dev \
31     libssl-dev libxslt1.1 zlib1g-dev
32 </span></code></pre></notextile>
33
34 Install prerequisites for CentOS 6:
35
36 <notextile>
37 <pre><code><span class="userinput">sudo yum install \
38     libyaml-devel glibc-headers autoconf gcc-c++ glibc-devel \
39     patch readline-devel zlib-devel libffi-devel openssl-devel \
40     automake libtool bison sqlite-devel
41 </span></code></pre></notextile>
42
43 Install prerequisites for Ubuntu 12.04 or 14.04:
44
45 <notextile>
46 <pre><code><span class="userinput">sudo apt-get install \
47     gawk g++ gcc make libc6-dev libreadline6-dev zlib1g-dev libssl-dev \
48     libyaml-dev libsqlite3-dev sqlite3 autoconf libgdbm-dev \
49     libncurses5-dev automake libtool bison pkg-config libffi-dev
50 </span></code></pre></notextile>
51
52 Build and install Ruby:
53
54 <notextile>
55 <pre><code><span class="userinput">mkdir -p ~/src
56 cd ~/src
57 curl http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.6.tar.gz | tar xz
58 cd ruby-2.1.6
59 ./configure --no-install-rdoc
60 make
61 sudo make install
62
63 sudo gem install bundler</span>
64 </code></pre></notextile>