Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
This backports require_relative to Ruby 1.8.
Ruby Shell
tree: c66362dfc9

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


In Ruby 1.9.2, "." was removed from the $LOAD_PATH. require_relative was added to let you require files relative to your current directory.

This gem backports both of these features to earlier Rubies.


require 'rubygems'
require 'require_relative'

require 'foo' #=> LoadError
require_relative 'foo' #=> works!

If you're intending to use this gem to transition from Ruby 1.8.x to 1.9.2, do this:

require 'rubygems'
require 'require_relative' if RUBY_VERSION =~ /1\.8/

And then it should run just fine on both.

Other Documentation

This gem is pretty straightforward, but we do have source documentation, generated by rocco. You can find it in the gh-pages branch of this repository or on the website.


Please fork the project, make your commits, push them to GitHub, and make a pull request. Patches should have documentation and/or tests. Don't be afraid to make a pull request without them, if you don't know how to test something we can work on it in the comments. :)

To run the tests, simply "rake test."

To install your development version of the gem, simply "rake install".

To generate the documentation, "rake read," and it'll open in your browser.

Something went wrong with that request. Please try again.