blackwinter / unicode

Unicode normalization library. (Mirror of Yoshida-san's code base to maintain the RubyGem.)
http://www.yoshidam.net/Ruby.html#unicode
79 stars 13 forks source link

ruby 2.0 x64: unicode_native load error #5

Closed Crossverse closed 11 years ago

Crossverse commented 11 years ago

I have got: C:/Legacy/Ruby2-64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- unicode/unicode_native (LoadError)

In lib folder absent unicode folder and absent unicode_native.so file but present "unicode" file.

Renaming unicode file to unicode_native.so, creating unicode dir and moving unicode_native.so to unicode dir =>resolved problem.

blackwinter commented 11 years ago

which rubygems version are you on? i'm pretty sure it's a duplicate of #4 (just verified unicode 0.4.4 with ruby 2.0.0 (2013-03-27 patchlevel 100) and rubygems 2.0.3 on x86_64-linux).

Crossverse commented 11 years ago

new rubygems resolve problem thanks.

AlphaLiu commented 11 years ago

Is there a new version could resolve this issue? I can not find newer than 0.4.4

blackwinter commented 11 years ago

it's a RubyGems bug; upgrade to 2.0.2 or higher and you should be good to go.

contentfree commented 10 years ago

I'm getting this same issue on Windows with Ruby 2.0.0 and RubyGems 2.2.2. The problem seems to be when bundle install drives the install, it creates the unicode_native.so in C:\Ruby200\lib\ruby\gems\2.0.0\gems\unicode-0.4.4-x86-mingw32\lib\unicode\1.9 instead of 2.0. This leads to a LoadError when trying to load from the versioned directory and then another LoadError when its fallback attempt to load unicode/unicode_native.so without the versioned directory.

contentfree commented 10 years ago

I'm trying to find in the (generated) Makefile where it specifies the Ruby version in the lib directory (lib/unicode/1.9). Anyone know where it does so?

contentfree commented 10 years ago

Talked with the illustrious Eric Hodel and he pointed out that there's a pre-built extension in the x86-mingw32 gem which has no 2.0/2.1 version so will not work with Ruby 2.0/2.1. @blackwinter: Can you cross-compile for 2.0/2.1 and publish a new gem?

blackwinter commented 10 years ago

@contentfree: done. (released as 0.4.4.1)

contentfree commented 10 years ago

@blackwinter: Thanks. However, 0.4.4.1 is not findable by Bundler (though I'm able to manually gem fetch it if I use the platform flag). If you don't want to push a 0.4.4.1 (or 0.4.5) version of the gem, I'll see if I can work around it

blackwinter commented 10 years ago

i pushed the windows gems, no idea why bundler can't find them. i can push the generic gem, too, if you think that might help.

contentfree commented 10 years ago

@blackwinter: It probably would. Cross-platform development sucks sometimes :)

contentfree commented 10 years ago

@blackwinter: Bundler is thoroughly confused by 0.4.4.1 as a version. It doesn't think "0.4.4.1" satisfies "~> 0.4.4". I'd consider that a Gemfile / Bundler bug, but the easiest fix is to just version bump to 0.4.5.

blackwinter commented 10 years ago

ok, i pushed a generic 0.4.4.1. i won't bump the version number to 0.4.5, though, as that'd conflict with yoshida's original version scheme (note that this is only a mirror to maintain the rubygem).