Easy Installation of Ruby Classes

Just a quick tidbit, but I’ve got a copule of classes that I consistently require, and it gets a bit redundant to include particular directories. Its not something that I’m ready to make a gem out of, but I looked into the standard Ruby inlude path. I beleive the paths are fairly standard, but you can always check this using irb

irb(main):001:0> $:

will display the include path.

If you copy .rb files to any of these directories (probably requiring sudo) you can require them from anywhere. I know there are other ways to do this, but this is a very quick way to do it.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: