Where should I put my Ruby and Rails code on IBM i?

This is equally a question of where you should NOT put your code.  Do not put it in the following locations:

  • /PowerRuby - This is where the PoweRuby product is located and upgrades could wipe out anything you put in here.
  • /QDLS - This is an older file system with naming length restrictions of 8 for the name and 3 for the extension (i.e. MYFILE~1.TXT)
  • /QSYS.LIB - The QSYS.LIB file system supports the IBM i library structure.  This file system provides you with access to database files and all of the other i5/OS object types that the library support manages on the system and in the basic user auxiliary storage pools (ASPs).

The RAILSNEW command will create new application folders in the current users /home directory by default, but the RAILSNEW command is mostly for initial project configuration and testing purposes and in the long term a single user shouldn't be tied to application by putting the app in their /home directory.

Instead we recommend putting your application code in /www/<Apache Instance Name/<Rails App Folder>/