Not logged inGosu Forums
Forum back to Help Search Register Login
Up Topic Gosu / Gosu Exchange / Problems using Gem under OS X
- By rkj Date 2008-12-21 19:14
Hi guys!
I installed gosu through:

> sudo gem install gosu

But when I try to run any example I get:

/opt/local/lib/ruby/gems/1.8/gems/gosu-0.7.11-universal-darwin/lib/gosu.bundle: dlopen(/opt/local/lib/ruby/gems/1.8/gems/gosu-0.7.11-universal-darwin/lib/gosu.bundle, 9): Library not loaded: /usr/lib/libruby.1.dylib (LoadError)
  Referenced from: /opt/local/lib/ruby/gems/1.8/gems/gosu-0.7.11-universal-darwin/lib/gosu.bundle
  Reason: image not found - /opt/local/lib/ruby/gems/1.8/gems/gosu-0.7.11-universal-darwin/lib/gosu.bundle
  from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
  from CptnRuby.rb:35

I really do not know exactly why is it, but I installed ruby completely from Port so maybe there is some static linking or something. Maybe building from source would help (I'll try it as soon as boost will compile), but maybe you could help?
Best regards,
- By jlnr (dev) Date 2008-12-22 13:37
Yes, this is definitely due to the custom Ruby installation. The source gem won't help as it contains only the Linux codebase and would result in an X11 version of Gosu. I think the easiest way would be to download the source archive and change the values for linker and header paths. Unfortunately, I have no idea how to do the latter automatically or independent of Ruby version.
BTW: You don't need to compile Boost for any part of Gosu, you just need to make its headers available. But it's a pain that it never, ever works with MacPorts (and if it does, it generally comes as an outdated version) :(
- By ? Date 2008-12-22 18:48
open a terminal and run

> otool -L /opt/local/lib/ruby/gems/1.8/gems/gosu-0.7.11-universal-darwin/lib/gosu.bundle

And paste the output here, I may have an idea to make it work. Of course, it may be ultimately easier to just install Ruby from source, but this is worth a shot too.
- By pyromanfo Date 2010-11-22 20:49
This was caused on my system by the Ruby dll that ships with OSX being moved out of the way to solve dependency problems.  When using RVM to manage ruby installations for instance, they will recommend moving the built-in OSX Ruby to get rid of version conflicts.  Moving it back solved my problems with gosu.
Up Topic Gosu / Gosu Exchange / Problems using Gem under OS X

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill