2 Copyright (C) The Arvados Authors. All rights reserved.
4 SPDX-License-Identifier: CC-BY-SA-3.0
7 Ruby 2.5 or newer is required.
9 * "Option 1: Install from packages":#packages
10 * "Option 2: Install with RVM":#rvm
11 * "Option 3: Install from source":#fromsource
13 h2(#packages). Option 1: Install from packages
15 {% include 'notebox_begin' %}
16 Future versions of Arvados may require a newer version of Ruby than is packaged with your OS. Using OS packages simplifies initial install, but may complicate upgrades that rely on a newer Ruby. If this is a concern, we recommend using "RVM":#rvm.
17 {% include 'notebox_end' %}
21 The Ruby version shipped with Centos 7 is too old. Use "RVM":#rvm to install Ruby 2.5 or later.
25 Debian 10 (buster) and Ubuntu 18.04 (bionic) and later ship with Ruby 2.5 or newer, which is sufficient for Arvados.
28 <pre><code># <span class="userinput">apt-get --no-install-recommends install ruby ruby-dev</span></code></pre>
31 h2(#rvm). Option 2: Install with RVM
33 h3. Install gpg and curl
38 yum install gpg curl which
44 apt-get --no-install-recommends install gpg curl
47 h3. Install RVM, Ruby and Bundler
50 <pre><code># <span class="userinput">gpg --keyserver pgp.mit.edu --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
51 \curl -sSL https://get.rvm.io | bash -s stable --ruby=2.5
52 </span></code></pre></notextile>
54 This command installs the latest Ruby 2.5.x release, as well as the @gem@ and @bundle@ commands.
56 To use Ruby installed from RVM, load it in an open shell like this:
59 <pre><code><span class="userinput">source /usr/local/rvm/scripts/rvm
60 </span></code></pre></notextile>
62 Alternately you can use @rvm-exec@ (the first parameter is the ruby version to use, or "default"), for example:
65 <pre><code><span class="userinput">rvm-exec default ruby -v
66 </span></code></pre></notextile>
68 h2(#fromsource). Option 3: Install from source
70 Install prerequisites for Debian 10, Ubuntu 18.04 and Ubuntu 20.04:
73 <pre><code><span class="userinput">sudo apt-get install \
74 bison build-essential gettext libcurl4 \
75 libcurl4-openssl-dev libpcre3-dev libreadline-dev \
76 libssl-dev libxslt1.1 zlib1g-dev
77 </span></code></pre></notextile>
79 Install prerequisites for CentOS 7:
82 <pre><code><span class="userinput">sudo yum install \
83 libyaml-devel glibc-headers autoconf gcc-c++ glibc-devel \
84 patch readline-devel zlib-devel libffi-devel openssl-devel \
85 make automake libtool bison sqlite-devel tar
86 </span></code></pre></notextile>
88 Build and install Ruby:
91 <pre><code><span class="userinput">mkdir -p ~/src
93 curl -f http://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.8.tar.gz | tar xz
95 ./configure --disable-install-rdoc
99 # Make sure the post install script can find the gem and ruby executables
100 sudo ln -s /usr/local/bin/gem /usr/bin/gem
101 sudo ln -s /usr/local/bin/ruby /usr/bin/ruby
103 sudo -i gem install bundler</span>
104 </code></pre></notextile>