RubyMKE Message Board › Sinatra Night - Fix for "require data_mapper" problem

Sinatra Night - Fix for "require data_mapper" problem

Dave S.
user 13756789
Group Organizer
Milwaukee, WI
Post #: 1
During the Sinatra tutorial night, I think a bunch of us ran into an error on part 2.

The problem came when you do
require 'data_mapper'

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.

To uninstall/reinstall:

$ 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

Alexander L.
bitfyre
Redwood City, CA
Post #: 6
Dave thanks for checking that out and sharing the fix here.
Powered by mvnForum

Our Sponsors

  • Bendyworks

    Bendyworks sponsored Pizza for the Oct 2011 meetup

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy