Tuesday, January 13, 2009

Solving LoadError problem on Mac OS X

Ruby's LoadError exception occurs when a file specified as a parameter to the load method cannot be loaded. This usually means that the file specified cannot be found in search path. To check if it really exists you should take a look your search path by opening the irb console and examining contents of $: array. Don't forget that gem method changes the contents of the array.

But what if file exists and you still got the problem? Check the privileges! When I installed textmate gem from Github, the textmate file (the one in /Library/Ruby/Gems/1.8/gems/wycats-textmate-0.9.2/bin/) had very weird set of privileges: -rwx-wx-wx. When I chmod-ed the file to 0755 (-rwxr-xr-x), which seems more logical anyways, everything worked as expected.

So, check your load paths and your privileges.


BarryOg said...

Hey, I found your reply to a blog post on getting a facebook app to run within Google App Engine. You seem to know what you're talking about and I had a quick question. I want to drop google maps into my facebook app but to do so I need to run as an IFrame. Do you know how I can do redirects from within an IFrame for login and adding the app? currently just doing a normal redirect fails.

sidonath said...

Hey there. Sorry, I still didn't work with IFrame apps, so I'm not sure how to solve the problem you have. I guess you would need to render some Javascript code which would redirect to the pages for login and adding app.

Something like this, I guess: http://www.last100meters.com/2007/6/20/facebook-iframe-app-redirects-how-to

VVME said...

Thank you, very nice post, your site would be followed , it give me a big view .
And welcome to my blog ,
which is about hid conversion kit.
have a nice day .

Christian Louboutin said...

This is a very nice post, I like it, Christian Louboutin also been concerned about it.