Skip to content

Instantly share code, notes, and snippets.

@thomasjachmann
Created October 28, 2010 14:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save thomasjachmann/651443 to your computer and use it in GitHub Desktop.
Save thomasjachmann/651443 to your computer and use it in GitHub Desktop.
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 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/...).
@camyhsu
Copy link

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
Copy link
Author

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