Native gems don't load

Torsten's Avatar


01 Apr, 2010 01:38 AM

This is new in 1.3.6 (on a mac 10.5 , ruby 1.8.7)

When I install a gem with native code, it doesn't load. My current example is json, but thin is just as bad (and used to work)
So I do
lightning:~ auringosta$ sudo gem install json
Building native extensions. This could take a while...
Successfully installed json-1.2.3
1 gem installed
Installing ri documentation for json-1.2.3...
Installing RDoc documentation for json-1.2.3...
lightning:~ auringosta$ irb
irb(main):001:0> require 'json'
LoadError: no such file to load -- json

    from (irb):1:in `require'

But when I go to the directory and require it works. Ie
lightning:~ auringosta$ cd /opt//local/lib/ruby/gems/1.8/gems/json-1.2.3/lib/
lightning:lib auringosta$ irb
irb(main):001:0> require 'json'
=> true

Seems to me the internal paths are not working so well. I wouldn't know where to look, but as it used to work, I think it's safe to assume it's a bug.

Thanks for help/fixes


PS: Anotherone that used to work was: gem used to install automatically into home directory if global was not writable. Not it just throws an error.

  1. Support Staff 1 Posted by Eric Hodel on 01 Apr, 2010 03:02 AM

    Eric Hodel's Avatar

    did you require 'rubygems'? It works for me:

    $ gem list json -i true
    $ ruby -rubygems -e 'require "json"' $

  2. Support Staff 2 Posted by Nick Quaranto on 17 Jul, 2010 08:25 PM

    Nick Quaranto's Avatar

    Going to resolve this one, if you're still seeing it feel free to open it back up.

  3. Nick Quaranto closed this discussion on 17 Jul, 2010 08:25 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac