开发者

Updating Ruby via RVM issue, seems to be a problem with libxml

开发者 https://www.devze.com 2023-01-31 00:47 出处:网络
I was about to start my first Rails 3 app and thought I would upgrade to the latest version of ruby before I did and the ruby fails to make correctly.

I was about to start my first Rails 3 app and thought I would upgrade to the latest version of ruby before I did and the ruby fails to make correctly.

I'm using Snow leopard on the 32bit kernal at the moment and every time I try and run 1.9.2 whether it's through readline or ssl I still get the following error:

ld: warning: in ../../libruby.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: in /Developer/SDKs/MacOSX1开发者_如何学C0.6.sdk/usr/local/lib/libxml2.2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
collect2: ld returned 1 exit status
make[1]: *** [../../.ext/i386-darwin10.5.0/tcltklib.bundle] Error 1

I tried using the 64 kernal using this among other as a guide http://www.markhneedham.com/blog/2010/07/08/installing-ruby-1-9-2-with-rvm-on-snow-leopard/ but then I get a similar message saying libxml1.dylib is failing because it's not set up to 64bit.

Has anyone got any ideas? it's driving me nuts...


Ok for anyone having the same issue as me I would suggest going to 64bit kernal - if your not sure how go here

I would then follow this excellent blog post

The only other thing I need to do above this post was as well as updating libxml I also had to update libxlst (which you can download from the same source). Once I ran the install checked it was pointing to the the correct kernal then everything updated fine.

Hope that helps anyone having the same issue!


You need to make sure your Ruby is 64-bit, and the native gem drivers match it. ruby -v on 64-bit Snow Leopard should display:

ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.5.0]

Your gems will complain about the architecture, returning the i386 fingerprint when there is a mismatch. To fix that you can try:

gem pristine --all

which should walk through all gems and reload them from the clean cached versions. In that process any native drives should be rebuilt.

0

精彩评论

暂无评论...
验证码 换一张
取 消