Skip to content

Building Ruby on Rails

aborkar-ibm edited this page Apr 23, 2020 · 76 revisions

Building Ruby on Rails

Below versions of Ruby on Rails are available in respective distributions at the time of creation of these build instructions:

  • Ubuntu 16.04 has 4.2.6-1
  • Ubuntu 18.04 has 4.2.10-0
  • Ubuntu 19.10 has 5.2.2

The instructions provided below specify the steps to build Rails version 6.0.2.2 on Linux on IBM Z for following distributions:

  • RHEL (7.6, 7.7, 7.8, 8.0, 8.1)
  • SLES (12 SP4, 12 SP5, 15 SP1)
  • Ubuntu (16.04, 18.04, 19.10)

General Notes:

  • When following the steps below please use a standard permission user unless otherwise specified.
  • A directory /<source_root>/ will be referred to in these instructions, this is a temporary writable directory anywhere you'd like to place it.

Step 1: Build Ruby

1.1) Build Ruby

  • Building Ruby (For RHEL (7.5, 7.6, 7.7) ,SLES (12 SP4, 12 SP5, 15 SP1)) and Ubuntu 16.04

Note: For Ubuntu 16.04, install the following packages before building Ruby: zlib1g-dev libssl-dev libreadline-dev.

1.2) Correct the gem environment for a standard user

  • RHEL (7.5, 7.6, 7.7) , SLES (12 SP4, 12 SP5, 15 SP1) and Ubuntu 16.04
        export GEM_HOME=~/.gem/ruby
        export PATH=~/.gem/ruby/bin:$PATH
  • RHEL (8.0 , 8.1)
        export PATH=~/bin:$PATH

Step 2: Installing Ruby on Rails

2.1) Add build dependencies

  • RHEL (7.6, 7.7, 7.8)

     sudo yum install -y patch make gcc
    
  • RHEL (8.0, 8.1)

      sudo yum groupinstall -y 'Development Tools'
      sudo yum install -y redhat-rpm-config zlib-devel.s390x zlib.s390x ruby-devel.s390x patch make gcc
    
  • SLES (12 SP4, 12 SP5, 15 SP1)

     sudo zypper install -y patch make gcc
    
  • Ubuntu 16.04

     sudo apt-get update
     sudo apt-get install -y patch git
    
  • Ubuntu (18.04, 19.10)

     sudo apt-get update
     sudo apt-get install -y ruby ruby-dev patch make gcc zlib1g-dev
    

2.2) Install Ruby on Rails via gem

      sudo gem install rails -v 6.0.2.2

2.3) Ruby on Rails is now installed. Verify version with command rails -v

  • (Output)

     Rails 6.0.2.2
    

References:

Clone this wiki locally