public
Created

an example for the platform issue with rvm

  • Download Gist
rvm-platform-issue.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
# switch to a rvm provided ruby version - creating a new gemset just to separate things
rvm --create 1.8.7@rjb-test
 
# then install rjb, this should work fine, installing rjb 1.3.1
gem install rjb
 
# now start ruby and require "rjb"
ruby -e 'require "rubygems"; require "rjb"'
 
# this should result in ruby terminating with the following message:
# [BUG] cross-thread violation on rb_gc()
# (null)
#
# Abort trap
 
# cleanup
gem uninstall rjb
 
# now how it should be done
gem install rjb --platform ruby
 
# Have a look at http://rubygems.org/gems/rjb - there's a standard-1.3.1 and a
# universal-darwin-10-1.3.1. RVM just issues gem install and gem then decides to
# install universal-darwin-10. That version is obviously precompiled against
# Mac OS X's standard ruby and won't run with rvm's ruby (1.8.7 in the example
# above).
#
# RVM should modify the environment somehow (now that could be the tricky part)
# so that gem doesn't fetch the gem suitable for the OS platform it runs on but for
# the ruby version it currently is set to use (ruby/jruby/...).

Thank you very much for posting this. I ran into this issue and did not know how to resolve it.

Glad I could help. I still do hope that this will be fixed in rvm. I'm afraid Wayne's moved on to other tasks, though.

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.