I like Ruby gems, I can see the resemblance to Perl’s old CPAN idea. CPAN always drove me crazy since everything you pulled down then had say 8-10 more libraries that it required. Till this day I still avoid often avoid perl just because of the pain of constantly installing libraries to get simple things to work.
I ran into one of those too easy to go wrong type problems. Just two easy steps to use XmlSimple:
-
1sudo gem install xml-simple
- Run a ruby script with
1require 'xmlsimple'
Two hours later I still get the same useless error that doesn’t really have any google hits:
`require': no such file to load -- xmlsimple
Hi Ed,
Not sure what platform you’re on, but you may need to close your terminal/command line session before using a newly installed gem.
I also ran into a problem the other day where I ended up with two gem repositories — I was installing to one location and rails was looking at a different place. the GEM_HOME env variable helped in that case.
Good luck!
Luke
I’m on Mac OS X 10.4, and I figured out my problem here. Thanks for the ideas though, as it forced me to spend more time reading the Ruby Gems manual where I was able to find the answer.
Wrong:
# sudo gem gem install xml-simple
Correct:
sudo gem install xml-simple
Yeah, that was a editor typo. I actually used:
Thanks for the catch.