Use non-default PowerRuby version

​When PowerRuby was installed there was included a command named SETPOWRBY.  That command allows you to set the machine-wide default PowerRuby version.  If your Rails application requires a different version than the default then you can export **an altered PATH to achieve pointing at the other version without interfering with other applications that depend on the default version.

Follow these steps to alter the PowerRuby version to use for the current shell session.

  1. Start a PASE shell session by either using CALL QP2TERM from a 5250 telnet session or use SSH from your desktop (i.e. from Terminal type ssh user@ibmi_ip_address).  
  2. Type echo $PATH to see what the current PATH environment variable value, as shown in Figure 1 below.
  3. Now use the export command to place the V2R0 version of PowerRuby before the ones symbolically linked in /QOpenSys/usr/bin.
  4. Do another echo to see the modified PATH.
  5. Run the ruby on rails version commands to see that it is now looking at the new PowerRuby version.

Figure 1 - IBM i PASE SSH session to override the active PowerRuby version without changing the default
IBM i PASE SSH session

** For the purposes of this documentation you can think of export as being similar to ADDLIBLE and PATH  as the PASE similarity to the IBM i library list.