Everything works for me from the command line, so I can start ruby myfileit and it works. But when I try to run it from the inside, I get
ruby myfile
undefined method `require_relative' for main:Object
Does anyone know what is missing in my sublime setup? I am using OS X and installed rvm.
This is probably because the sublime version is 1.8.7 Ruby. You can change that. Here is how .
Alternatively, you can simply use "require" and it should work fine. I think "require_relative" is only available for ruby 1.9+