Undefined method `require_relative 'for main: Object when starting assembly from an elevated

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

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.

+5
source share
2 answers

This is probably because the sublime version is 1.8.7 Ruby. You can change that. Here is how .

+4
source

Alternatively, you can simply use "require" and it should work fine. I think "require_relative" is only available for ruby ​​1.9+

+4

All Articles