|
|
|
[
Permlink
| « Hide
]
Stephen Bannasch - 23/Dec/07 02:31 PM
Specifying the platform as 'jruby' does work (jruby r5344):
Well, traditionally if you installed remotely, you'd get the choice of which mongrel version to install, then you'd have to choose jruby. Of course, fastthread is a C library and as such cannot be used from JRuby.
If something has changed and the default behavior is to try to install fastthread, that's not good, of course. Is this something the new RubyGems version has caused? Yes, I think this is related to the new rubygems.
I'm not clear yet on the details on how gem running locally in jruby communicates with the gem repository and the specs for the gem being installed to indicate what platform is running locally and how that affects what is downloaded and run to install the gem. But it seems clear that the general issue is not with fastthread but that 'gem install mongrel' running in jruby trunk (with our slightly patched version of rubygems) is following the process for installing the MRI version of mongrel. Fasthread is just where the process first breaks. Of course there were some other MRI mongrel gems installed as dependencies that while they installed successfully are not needed on jruby:
I also can't install hpricot for what looks like the same reason – though setting platform to either 'jruby' or 'java' doesn't fix the problem.
]$ gem install hpricot /Users/stephen/dev/java/src/moz/jrubytrunk/bin/jruby extconf.rb install hpricot Gem files will remain installed in /Users/stephen/dev/java/src/moz/jrubytrunk/lib/ruby/gems/1.8/gems/hpricot-0.6 for inspection. /Users/stephen/dev/java/src/moz/jrubytrunk/bin/jruby extconf.rb install hpricot --platform jruby Gem files will remain installed in /Users/stephen/dev/java/src/moz/jrubytrunk/lib/ruby/gems/1.8/gems/hpricot-0.6 for inspection. /Users/stephen/dev/java/src/moz/jrubytrunk/bin/jruby extconf.rb install hpricot --platform java Gem files will remain installed in /Users/stephen/dev/java/src/moz/jrubytrunk/lib/ruby/gems/1.8/gems/hpricot-0.6 for inspection. In gems 1.0 the JRuby platform is now called "java". I don't really understand the reasoning but a similar change was made for the mswin32 platform.
mackenzie:~/p eweaver$ jruby -S gem install mongrel --platform java But JRuby is not requesting either the java platform or the jruby platform (still wrong, but would snag version 1.1.2 or lower) by default. Note that gems no longer lists every platform by default as Ola says; it tries to install the correct one automatically. This is new behavior in gems 1.0. So perhaps it never identified the platform correctly before, but people would manually always choose 'jruby' so it never mattered until now.
This probably needs a priority bump because it makes it impossible to ship gems with extensions. hmmm ... just updated to 5481 and it's still not working for me:
$ gem uninstall mongrel Successfully uninstalled mongrel-1.1.3-java Remove executables and scripts for 'mongrel_rails' in addition to the gem? [Yn] Y Removing mongrel_rails $ gem install mongrel Updating metadata for 33 gems from http://gems.rubyforge.org ................................. complete ERROR: Error installing mongrel: mongrel requires fastthread (>= 1.0.1) |
|||||||||||||||||||||||||||||||||||||||||||||||||||