[MacRuby-devel] mac & ruby question

Conrad Taylor conradwt at gmail.com
Sun Dec 6 21:22:46 PST 2009


TIm, does gems install correctly with Ruby 1.8.7 which is the default  
in Snow Leopard?  This should be the case.  Next, x86_64 is the  
default under Snow Leopard and your bundles are being correctly.   
Thus, I would recommend sticking with default compilation settings.    
For example, the following is all you need:

gem install hpricot

Thus, I would recommend going through the process again of reinstalling.

Good luck,

-Conrad

Sent from my iPhone

On Dec 6, 2009, at 8:43 PM, Tim Rand <timrandg at gmail.com> wrote:

> I am sorry. This is not a macruby question per se, just a question  
> about plain old ruby on mac (specifically snow leopard) question.  
> But you guys for sure will know the answer, so I must ask. Why is it  
> that after upgrading to snow leopard (10.6.2) a long list of gems no  
> longer run on ruby 1.9.1?
>
> Using Matt Aimonetti's sl_gems_update.rb file, I get:
> Please reinstall:
> eventmachine versions: 0.12.0, 0.12.0
> fastthread versions: 1.0.1, 1.0.1
> hpricot versions: 0.6.161, 0.6.161, 0.8.2, 0.8.2, 0.8.2, 0.8.2
> hpricot-0.6.161/lib/universal versions: darwin9.0, darwin9.0
> mongrel versions: 1.1.5, 1.1.5
> rb-appscript versions: 0.5.1, 0.5.1
> rmagick versions: 2.2.0, 2.2.0
> rsruby versions: 0.4.5, 0.4.5
> ruby-debug-base versions: 0.10.3, 0.10.3
> sqlite3-ruby versions: 1.2.1, 1.2.1
> tioga versions: 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8, 1.8
> tmail versions: 1.2.3.1, 1.2.3.1
>
> Indeed, I had noticed already that hpricot, rsruby, and sqlite3 were  
> no longer working.
> Reinstalling eventmachine and fastthread worked.
> But many of the others appear to install, but don't function:
>
> Tim:~/Desktop/RubyClub> sudo env ARCHFLAGS="-arch i386" gem install  
> why-hpricot --source http://gems.github.com
> Building native extensions.  This could take a while...
> Successfully installed why-hpricot-0.7.229
> 1 gem installed
> Installing ri documentation for why-hpricot-0.7.229...
> Installing RDoc documentation for why-hpricot-0.7.229...
> Tim:~/Desktop/RubyClub> gem which hpricot
> (checking gem why-hpricot-0.7.229 for hpricot)
> /usr/local/lib/ruby19/gems/1.9.1/gems/why-hpricot-0.7.229/lib/ 
> hpricot.rb
> Tim:~/Desktop/RubyClub> ruby -e 'require "hpricot"'
> /usr/local/lib/ruby19/gems/1.9.1/gems/why-hpricot-0.7.229/lib/ 
> hpricot.rb:20:in `require': dlopen(/usr/local/lib/ruby19/gems/1.9.1/ 
> gems/why-hpricot-0.7.229/lib/hpricot_scan.bundle, 9): no suitable  
> image found.  Did find: (LoadError)
> 	/usr/local/lib/ruby19/gems/1.9.1/gems/why-hpricot-0.7.229/lib/ 
> hpricot_scan.bundle: mach-o, but wrong architecture - /usr/local/lib/ 
> ruby19/gems/1.9.1/gems/why-hpricot-0.7.229/lib/hpricot_scan.bundle
> 	from /usr/local/lib/ruby19/gems/1.9.1/gems/why-hpricot-0.7.229/lib/ 
> hpricot.rb:20:in `<top (required)>'
> 	from -e:1:in `require'
> 	from -e:1:in `<main>'
>
> And file on that path gives:
> file /usr/local/lib/ruby19/gems/1.9.1/gems/why-hpricot-0.7.229/lib/ 
> hpricot_scan.bundle
> Mach-O 64-bit bundle x86_64
>
> I am pretty sure that the problem is with .bundle files being  
> compiled for x86_64 architecture, but I explicitly told the os to use
> env ARCHFLAGS="-arch i386"
> and it ignored it and put the bundle files in the x86_64  
> architecture anyhow.
>
> I am stuck. Why am I getting the mach-o but wrong architecture error?
>
> It seems to be a problem with gems that have .bundle files.
> If anyone can explain how I should be installing gems in snow  
> leopard so that they actually work, I would really like that person.  
> Seriously.
> Tim
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20091206/39820ddb/attachment.html>


More information about the MacRuby-devel mailing list