I'm new to programming and trying to learn Ruby through some online tutorials. I have textmate and have created a Ruby folder in my Documents folder to hold my .rb files. While working through "Why's Poignant Guide" I came a across a two file program. One file attempts to 'require' the other. However, this doesn't work in this folder. Is there anyway to set textmate up to look here. I've come across a few sites that seem to be addressing this but I don't understand how file paths work in Unix.
A:
You'll have to set the RUBYLIB
variable to the directory that contains your files. Let's say it's at ~/Documents/Ruby
(that is, a folder "Ruby" in your "Documents" folder). ~
is shorthand for /User/yourusername
, so the full path to the directory is /Users/yourusername/Documents/Ruby
. You'll set this as RUBYLIB
in TextMate, which you can do by going to Preferences -> Advanced -> Shell Variables, then click the "+" button and add RUBYLIB
as the "Variable" and /Users/yourusername/Documents/Ruby
as the "Value".
mipadi
2010-08-26 15:16:01
Thanks for the response mipadi. This still isn't working. No idea why. Running an old iBook with 10.5.8. Frustrating but I'll work around it for now I guess.
ryanA
2010-08-28 18:10:39