Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
an example for the platform issue with rvm
# 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 - 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/...).

camyhsu commented Apr 12, 2011

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


thomasjachmann commented Apr 13, 2011

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment