Sections
Daniel
Moriah
Photos
Recipes
Movies
Software
Other
About
Contact
Show/Hide Search
Wolf
Entries By:
Daniel
Moriah

Entry Type:
Audio
Blog
Chat
Code
Link
Lyrics
Picture
Quote
Thought
Video

Archives By:
2010
M
F
J
2009
D
N
O
S
A
J
J
M
A
M
F
J
2008
D
N
O
S
A
J
J
M
A
M
F
J
2007
D
N
O
S
A
J
J
M
A
M
F
J
2006
D
N
O
S
A
J
J
M
A
M
F
J
2005
D
N
O
S
A
J
J
M
A
M
F
J
2004
D
N
O
S
A
J
J
M
A
M
F
J
2003
D
N
O
S
A

Links:
Toast Driven
Gemstone Creations
Wagging Work
Luke
Peter
Matt
Christian
Andy
Nummy!
Arthur
Nico
Mike T.
Bojangler
Eric's A Dirty Hippie
Phil
All Entries Filtered By Date: 2007-05-01
May 22, 2007

[Moriah] Parenting Is... #12

...the joy of seeing and feeling Baby's first pearly white! Congratulations, sweetie, on your very first tooth!
May 16, 2007

[Moriah] Happy Birthday, Honey!

Today, I wish my sweet Daniel a happy 25th birthday! We love you lots!!!

Daniel wonders...

I'm now a quarter of a century old.

May 15, 2007

[Daniel] Ruby Gems & "LoadError"

Perhaps you, like I, are experimenting with RubyGems for the first time. Perhaps you too, like I, have used your shiny new "sudo gem install" command to great success, seeing many new and wonderful things install on your computer. And perhaps, just perhaps, you are receiving a rather callous and unfriendly like "LoadError: no such file to load -- mysql".

Rest assured, dear reader, that you are not alone in your frustrations. It's nothing you've done wrong. It's what you haven't done that's the problem. Installation does not end with "ruby setup.rb" and you can magically use your gems. As I found out the hard way (see "many hours wasted" in the dictionary for details), when gems are installed, they're not in a place "irb" or "ruby" are expecting them, like what you'd find after using the CheeseShop, CPAN or PEAR.

There are three ways to fix this problem, as detailed in RubyGems' manual. Either you...


  • "require 'rubygems'" before requiring the gem you'd like,

  • "ruby -rubygems my_code.rb" when running your program or ...

  • (and this is my preference) simply place an "export RUBYOPT=rubygems" someplace in your shell's initialization file, like "~/.bash_profile" on Mac OS X.



Maybe somehow I should have somehow run into this solution sooner but it was very frustrating to hit this, especially after the relative ease everything else happened with. I'd appreciate a prompt during the "rubygems" setup to either automatically set this up or provide a great big, friendly warning message. Hopefully this saves someone (even future-me) some time and frustration.
May 7, 2007