→ Load Paths

19 February 2010

If your import is failing in Python or your require can't locate a Ruby file, here is how to find the load path in each language:


$ python
>>> import sys
>>> sys.path
['', '/usr/lib/python2.5', '/usr/lib/python2. ...]


$ irb
=> ["/usr/local/lib/site_ruby/1.8", "/usr/local ...]

These should help you debug load errors, especially if you're new to either language.