Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6.2
-
Fix Version/s: JRuby 1.6.4
-
Component/s: Core Classes/Modules
-
Labels:None
-
Environment:jruby 1.6.1 (ruby-1.8.7-p330) (2011-04-25 ef0212b) (OpenJDK 64-Bit Server VM 1.7.0-internal) [darwin-universal-java]
-
Number of attachments :
Description
I installed jruby head using rvm using the standard Java 1.6.0
Then using a recent build of the macosx-port Java 1.7 build:
http://www.concord.org/~sbannasch/macosx-port/java-1.7.0-internal-macosx-port-2011-04-25.tar.gz
Expand and copy to ~/Library/Java/JavaVirtualMachines
Open /Applications/Utilities/Java\ Preferences.app and move OpenJDK7 to the top of the list.
Open a new shell.
$ java -version openjdk version "1.7.0-internal" OpenJDK Runtime Environment (build 1.7.0-internal-stephen_2011_04_16_22_03-b00) OpenJDK 64-Bit Server VM (build 21.0-b07, mixed mode) $ ruby --version jruby 1.6.1 (ruby-1.8.7-p330) (2011-04-25 ef0212b) (OpenJDK 64-Bit Server VM 1.7.0-internal) [darwin-universal-java]
I then also installed rubygems 1.7.2 (but I don't think that matters):
$ rvm use jruby-head
Using /Users/stephen/.rvm/gems/jruby-head
Running /Users/stephen/.rvm/hooks/after_use
$ gem install rubygems-update
Successfully installed rubygems-update-1.7.2
1 gem installed
[dev]$ update_rubygems
RubyGems 1.7.2 installed
=== 1.7.2 / 2011-04-05
* 1 Bug Fix:
* Warn on loading bad spec array values (ntlm-http gem has nil in its cert
chain)
------------------------------------------------------------------------------
RubyGems installed the following executables:
/Users/stephen/.rvm/rubies/jruby-head/bin/jgem
Now install nokogiri and try and require it:
$ gem install nokogiri Successfully installed nokogiri-1.4.4.2-java 1 gem installed $ ruby -e "require 'rubygems'; require 'nokogiri'" LoadError: Unsupported platform: unknown-darwin require at org/jruby/RubyKernel.java:1038 require at /Users/stephen/.rvm/rubies/jruby-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36 (root) at /Users/stephen/.rvm/rubies/jruby-head/lib/ruby/site_ruby/shared/ffi/ffi.rb:69 require at org/jruby/RubyKernel.java:1038 require at /Users/stephen/.rvm/rubies/jruby-head/lib/ruby/site_ruby/shared/ffi/ffi.rb:36 (root) at /Users/stephen/.rvm/rubies/jruby-head/lib/ruby/site_ruby/shared/ffi.rb:1 require at org/jruby/RubyKernel.java:1038 require at /Users/stephen/.rvm/rubies/jruby-head/lib/ruby/site_ruby/shared/ffi.rb:36 (root) at /Users/stephen/.rvm/gems/jruby-head@xproject/gems/nokogiri-1.4.4.2-java/lib/nokogiri.rb:10 require at org/jruby/RubyKernel.java:1038 require at /Users/stephen/.rvm/gems/jruby-head@xproject/gems/nokogiri-1.4.4.2-java/lib/nokogiri.rb:57 (root) at -e:1
$ gem install nokogiri
Issue Links
- supercedes
-
JRUBY-5736
error: "Unsupported platform: unknown-darwin" when using JRuby's ffi and Java 1.7 macosx-port build
-
This is due to the unexpected value of the os.arch property set by the JDK.
$ java -version; jruby -rjava -e 'p java.lang.System.getProperty("os.arch")' java version "1.6.0_24" Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326) Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-334, mixed mode) "x86_64"$ java -version; jruby -rjava -e 'p java.lang.System.getProperty("os.arch")' openjdk version "1.7.0-internal" OpenJDK Runtime Environment (build 1.7.0-internal-b00) OpenJDK 64-Bit Server VM (build 21.0-b03, mixed mode) "universal"I don't know what "universal" is supposed to mean. This sounds like something to be worked out by the JDK itself.