error: "Unsupported platform: unknown-darwin" when using JRuby's ffi and Java
1.7 macosx-port build
---------------------------------------------------------------------------------------------------
Key: JRUBY-5737
URL: http://jira.codehaus.org/browse/JRUBY-5737
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.6.2
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]
Reporter: Stephen Bannasch
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.
{noformat}
$ 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]
{noformat}
I then also installed rubygems 1.7.2 (but I don't think that matters):
{noformat}
$ 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
{noformat}
Now install nokogiri and try and require it:
{noformat}
$ 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
{noformat}
$ gem install nokogiri
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email