Using RubyCocoa on 10.11

I'm running the first beta of OS X 10.11, which looks to have brought a slightly updated version of Ruby 2.0 with it. I have RubyCocoa installed, and have several Ruby scripts which require it. I am getting segmentation faults when I try to run these scripts.


An example of the script:

#!/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby

require 'rubygems'
require 'osx/cocoa'
...


This is what the first part of the output looks like:

/Library/Ruby/Site/2.0.0/universal-darwin14/rubycocoa.bundle: [BUG] Segmentation fault
ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]


-- Crash Report log information --------------------------------------------
   See Crash Report log file under the one of following:
     * ~/Library/Logs/CrashReporter
     * /Library/Logs/CrashReporter
     * ~/Library/Logs/DiagnosticReports
     * /Library/Logs/DiagnosticReports
   the more detail of.


-- Control frame information -----------------------------------------------
c:0011 p:-17560800740396 s:0052 e:000051 TOP    [FINISH]
c:0010 p:---- s:0050 e:000049 CFUNC  :require
c:0009 p:0115 s:0046 e:000045 METHOD /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55
c:0008 p:0007 s:0036 e:000035 TOP    /Library/Ruby/Site/2.0.0/osx/foundation.rb:8 [FINISH]
c:0007 p:---- s:0034 e:000033 CFUNC  :require
c:0006 p:0115 s:0030 e:000029 METHOD /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55
c:0005 p:0007 s:0020 e:000019 TOP    /Library/Ruby/Site/2.0.0/osx/cocoa.rb:8 [FINISH]
c:0004 p:---- s:0018 e:000017 CFUNC  :require
c:0003 p:0115 s:0014 e:000013 METHOD /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55
c:0002 p:0015 s:0004 E:000fc8 EVAL   copy_content_folder.rb:7 [FINISH]
c:0001 p:0000 s:0002 E:001508 TOP    [FINISH]


copy_content_folder.rb:7:in `<main>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/Library/Ruby/Site/2.0.0/osx/cocoa.rb:8:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/Library/Ruby/Site/2.0.0/osx/foundation.rb:8:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'


As a workaround I've tried replacing the Ruby on 10.11 with the one that came from 10.10, but it makes no difference.


Has anyone else been receieving these sorts of errors? Should I be reporting this as a bug to Apple, the Ruby developers, or the RubyCocoa developers?

Thanks in advance.

It's most certainly not an Apple problem.

Apple doesn't code to make sure their software works with other vendors.

It's the other way around and always has been.

This is true, and in general I'd rather have Apple code things the right way instead of trying to work around bugs and "expected behavior" if it violates documentated usage (or tries to use undocumented features), but Apple has been known to indroduce bugs that cause other software to fail. The likelihood is much higher in a beta release, but Apple has done the same in production releases, so it doesn't always do to just point fingers at third party software.

I have the same problem, there is a solution to install rubycocoa on Osx 10.11?

Apple should include RubyCocoa in the OS now that it works with current ruby versions.

They still include PyObjC. They should do the same with Ruby.

I ended up manually reverting the version of Ruby in the System/Frameworks/ directory on the earlier betas. In preparation for SIP I want to stop doing this now... In the latest beta of 10.11, I'm encountering a different exception:


/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': dlopen(/Library/Ruby/Site/2.0.0/universal-darwin15/rubycocoa.bundle, 9): Library not loaded: @executable_path/../Frameworks/RubyCocoa.framework/Versions/A/RubyCocoa (LoadError)
  Referenced from: /Library/Ruby/Site/2.0.0/universal-darwin15/rubycocoa.bundle
  Reason: unsafe use of @executable_path in /Library/Ruby/Site/2.0.0/universal-darwin15/rubycocoa.bundle with restricted binary - /Library/Ruby/Site/2.0.0/universal-darwin15/rubycocoa.bundle


Does anyone have any clue what this message means, and whether there's something I can do to fix it?

Using RubyCocoa on 10.11
 
 
Q