Yes.
/opt/local/bin/ruby

I know it sounds stupid that it should segfault against 1.8.7 when  
installed with ruby 1.9.1'gem'
I hope that it isn't something like the gem using a guess on mac as to  
'site_ruby' and macports is being circumvented.
Anecdotal evidence from others using ruby 1.9.1 is that it's only me...

I'm reinstalling my macports with:
sudo port upgrade --force installed
(upgrade all currently installed ports)

Will let all concerned know how I go.

Ruby 1.9.1 - not for the faint of heart. (I've overcome a few hurdles  
just to get to this stage lol - all in all a very nice experience when  
it works though)

-Adam

On 16/09/2009, at 3:03 PM, Ian Leitch wrote:

> I've not been following this thread very closely, but the ruby  
> version you're building the gem against is 1.8.7, not 1.9.1.
>
> Wild guess... you're building the gem using sudo, does your root  
> user have /opt/local/bin in PATH?
>
> does 'which ruby' and 'sudo which ruby' give you the same result?
>
> 2009/9/16 Adam Salter <adam.q.sal...@gmail.com>
> Firstly, wow cutting edge hardware!
> 'arch -x86_75 irb'
> ;)
>
> Second,
> Protip: require 'rbconfig'
>
> >> Config::CONFIG['CFLAGS']
> NameError: uninitialized constant Config
>       from (irb):1
>       from /opt/local/bin/irb:12:in `<main>'
> >> require 'config'
> LoadError: no such file to load -- config
>       from (irb):2:in `require'
>       from (irb):2
>       from /opt/local/bin/irb:12:in `<main>'
> >> require 'rbconfig'
> => true
> >> Config::CONFIG['CFLAGS']
> => "-O2 -arch x86_64 -O2 -g -Wall -Wno-parentheses  -fno-common - 
> pipe -fno-common"
>
> It _is_ 64 bit. :/
>
>
> And third,
> It works if i install hpricot from source...
>
> now i'm getting json gem compiler errors... even after uninstall/ 
> reinstall
>
>> /Users/adam/.gem/ruby/1.9.1/gems/json-1.1.9/ext/json/ext/ 
>> parser.bundle: [BUG] Segmentation fault
>> ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0]
>>
>> Abort trap
>
>
> I think my macports archs might be f#$%ked up somewhere along the  
> line.
>
> I was a _early_ snow leopard adopter and a lot changed in the first  
> few days...
>
> -Adam
>
> On 16/09/2009, at 2:35 PM, Bodaniel Jeanes wrote:
>
>> Nice ... Good tip for me to remember!
>>
>> >> Config::CONFIG['CFLAGS']
>> => "-arch i386 -arch x86_64 -g -Os -pipe -fno-common - 
>> DENABLE_DTRACE  -fno-common  -pipe -fno-common  "
>>
>> Adam, is you see it is compiled as both you can force it to run as  
>> one or the other by doing:
>>
>> $ arch -i386 irb
>>
>> or
>>
>> $ arch -x86_75 irb
>>
>> and see if that yields better results (`man arch` for more info)
>>
>> On Wed, Sep 16, 2009 at 2:30 PM, Ian Leitch <port...@gmail.com>  
>> wrote:
>> ~ $ irb
>> irb(main):001:0> Config::CONFIG['CFLAGS']
>> => "-O2 -arch x86_64  -fno-common -pipe -fno-common  "
>> irb(main):002:0>
>>
>> 2009/9/16 Bodaniel Jeanes <m...@bjeanes.com>
>>
>> nevermind, none of those return anything useful for me with regards  
>> to the architecture. Someone who is more knowledgeable about these  
>> things could probably find out using something like Array#pack and  
>> the byte orders etc but this is way beyond my knowledge. If `file`  
>> says it is 64-bit it's a good bet it is and perhaps you should be  
>> force-compiling Hpricot as 64-bit instead...
>>
>>
>> On Wed, Sep 16, 2009 at 2:12 PM, Bodaniel Jeanes <m...@bjeanes.com>  
>> wrote:
>> Sorry .. what about the following constants:
>>
>> >> Object.constants.grep /RUBY/
>> => ["RUBY_DESCRIPTION", "RUBY_VERSION", "RUBY_COPYRIGHT",  
>> "RUBY_FRAMEWORK", "RUBY_RELEASE_DATE", "RUBY_FRAMEWORK_VERSION",  
>> "RUBY_PLATFORM", "RUBY_PATCHLEVEL"]
>>
>>
>> On Wed, Sep 16, 2009 at 1:44 PM, Adam Salter  
>> <adam.q.sal...@gmail.com> wrote:
>> So what version of ruby1.9 do I have? 'i386-darwin10' or 'x86_64'
>>
>> btw: ruby -e 'puts RUBY_VERSION'
>> gives '1.9.1'
>>
>> -Adam
>>
>> On 16/09/2009, at 1:34 PM, Lincoln Stoll wrote:
>>
>>> That's because SL reports the kernel architecture as the platform  
>>> type, not the userspace architecture. It's been a contentious  
>>> issue.. But that's another story.
>>>
>>> Also, by default macports on 64 bit capable systems will build 64  
>>> bit binaries. You can change this to build for 32/64 or 32 only by  
>>> playing with the universal variant.
>>>
>>> Linc
>>>
>>> // Sent from my mobile phone.
>>>
>>> On 16/09/2009, at 3:38, Adam Salter <adam.q.sal...@gmail.com> wrote:
>>>
>>>> I don't know what the hell is going on:
>>>>
>>>> [r...@omegatron ~]# ruby -v
>>>> ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-darwin10]
>>>> [r...@omegatron ~]# file `which ruby`
>>>> /opt/local/bin/ruby: Mach-O 64-bit executable x86_64
>>>>
>>>> ruby is saying it's 32-bit, file is saying it's 64-bit
>>>>
>>>> -Adam
>>>>
>>>> On 15/09/2009, at 8:54 PM, Bodaniel Jeanes wrote:
>>>>
>>>>> using stock ruby you definitely want to be doing that, he is  
>>>>> using macports ruby 1.9 which based on his `ruby -v` output is  
>>>>> 32-bit so he should in fact ensure that he is compiling the  
>>>>> extensions as 32-bit
>>>>>
>>>>> On Tue, Sep 15, 2009 at 8:21 PM, Pat Allan <p...@freelancing-gods.com 
>>>>> > wrote:
>>>>>
>>>>> Not sure if it's relevant, but for Snow Leopard I installed  
>>>>> mysql, pg
>>>>> and do_sqlite3 gems configured for 64bit like so:
>>>>>   sudo env ARCHFLAGS="-arch x86_64" gem install mysql
>>>>>
>>>>> --
>>>>> Pat
>>>>>
>>>>> On 15/09/2009, at 11:04 AM, Bodaniel Jeanes wrote:
>>>>>
>>>>> > I'm still running 187 but i have 191 installed (from source).  
>>>>> I just
>>>>> > tried installing it and I could use the gem fine. I installed  
>>>>> like
>>>>> > so, just to be sure:
>>>>> >
>>>>> > $ sudo env ARCHFLAGS="-arch i386" gem install hpricot
>>>>> >
>>>>> >
>>>>> > On Tue, Sep 15, 2009 at 6:20 PM, Adam Salter
>>>>> > <adam.q.sal...@gmail.com> wrote:
>>>>> > Interesting point...
>>>>> > Are you running ruby 1.9.1/hpricot 64bit?
>>>>> >
>>>>> > -Adam
>>>>> >
>>>>> > On 15/09/2009, at 6:09 PM, Bodaniel Jeanes wrote:
>>>>> >
>>>>> >> One thing to consider is that the ruby 1.8.7 that comes with  
>>>>> 10.6
>>>>> >> is 64-bit but your ruby 1.9 seems to be 32-bit. Possibly the  
>>>>> gem
>>>>> >> install picked up on some incorrect env variables and  
>>>>> defaulted to
>>>>> >> building Hpricot for 64-bit?
>>>>> >>
>>>>> >> On Tue, Sep 15, 2009 at 5:43 PM, Adam Salter
>>>>> >> <adam.q.sal...@gmail.com> wrote:
>>>>> >> Is anybody else seeing a segfault on hpricot on OSX 10.6 and  
>>>>> Ruby
>>>>> >> 1.9.1?
>>>>> >>
>>>>> >> I've installed ruby with MacPorts.
>>>>> >>
>>>>> >> Here's the error:
>>>>> >>
>>>>> >>> /opt/local/lib/ruby1.9/gems/1.9.1/gems/hpricot-0.8.1/lib/
>>>>> >>> fast_xs.bundle: [BUG] Segmentation fault
>>>>> >>> ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0]
>>>>> >>>
>>>>> >>> Abort trap
>>>>> >>
>>>>> >> ruby -v:
>>>>> >> ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-darwin10]
>>>>> >>
>>>>> >> -Adam
>>>>> >>
>>>>> >>
>>>>> >>
>>>>> >>
>>>>> >>
>>>>> >>
>>>>> >>
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> > >
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>
>
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To post to this group, send email to rails-oceania@googlegroups.com
To unsubscribe from this group, send email to 
rails-oceania+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to