Skip to content

Building Ruby on Rails

aborkar-ibm edited this page Apr 19, 2017 · 78 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
  • Ubuntu 16.10 has 4.2.7
  • SLES 11 SP4 has 2.3.14

The instructions provided below specify the steps to build Rails version 5.0.2 on IBM z Systems for following distributions:

  • RHEL (6.9, 7.1, 7.2, 7.3)
  • SLES (11 SP4, 12, 12 SP1, 12 SP2)
  • Ubuntu (16.04, 16.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 writeable directory anywhere you'd like to place it.

Step 1: Build Ruby

1.1) Build Ruby 1.9.3+

  • Building Ruby (For RHEL (6.9, 7.1, 7.2, 7.3) and SLES (11 SP4, 12, 12 SP1, 12 SP2))

Note: The available yum / zypper version of Ruby is too low level for the distros.

1.2) Correct the gem environment for a standard user

  • RHEL (6.9, 7.1, 7.2, 7.3) and SLES (11 SP4, 12, 12 SP1, 12 SP2)

      export GEM_HOME=/home/<USER>/.gem/ruby
      export PATH=/home/<USER>/.gem/ruby/bin:$PATH
    

Note: Where <USER> is the standard user you are installing under.

Step 2: Installing Ruby on Rails

2.1) Add build dependencies

  • RHEL (6.9, 7.1, 7.2, 7.3)

     sudo yum install -y patch make gcc
    
  • SLES (11 SP4, 12, 12 SP1, 12 SP2)

     sudo zypper install -y patch make gcc
    
  • Ubuntu (16.04, 16.10)

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

2.2) Install Ruby on Rails via gem

  • RHEL (6.9, 7.1, 7.2, 7.3) and SLES (11 SP4, 12, 12 SP1, 12-SP2)

     gem install rails -v 5.0.2
    
  • Ubuntu (16.04, 16.10)

     sudo gem install rails -v 5.0.2
    

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

  • (Output)

     5.0.2
    

References:

Clone this wiki locally