RubyMKE Message Board › Sinatra Night - Fix for "require data_mapper" problem
During the Sinatra tutorial night, I think a bunch of us ran into an error on part 2.
The problem came when you do
It turned out that for me, this was actually a problem with iconv, a character conversion library. I'm probably in a unique situation, in that I was on my work laptop again so my environment is Cygwin. That said, I think it should work fine for anyone using rvm, and I'll try on os x later at home.
If you have alternate means of installing the iconv library, you can try that. I also needed the readline library so you may as well.
Cygwin provides a package for libiconv but I couldn't get that to work. So I had to look elsewhere and it turns out you can install iconv from rvm. I just did the following:
$ rvm package install readline
$ rvm package install iconv
You now have to re-compile your ruby.
$ rvm uninstall <current_ruby>
$ rvm install <current_ruby>
or if, like me, you have a little bit older version of ruby and some gemsets you'd like to migrate, you can upgrade:
$ rvm install 1.9.2-p290
$ rvm upgrade <current_ruby> 1.9.2-p290
Edited by Dave Strock on Sep 20, 2011 4:39 PM
Redwood City, CA
Dave thanks for checking that out and sharing the fix here.