Feature Requests: Browse | Submit New | Admin

[#29293] RVM and RJB don't play nice together

Date:
2011-06-25 18:42
Priority:
3
Submitted By:
Gabe McArthur (gabemc)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
RVM and RJB don't play nice together

Detailed description
I was working with buildr, which requires rjb. I use RVM to manage my rubies, and I used:

rvm use 1.8.7
rvm gemset create buildr
rvm use 1.8.7@buildr
gem install buildr
buldr

I then got:

[BUG] cross-thread violation on rb_gc()
(null)

zsh: abort      buildr

Long story short, when you uploaded the gem, it looks like you compile it against the runtime version of Ruby that comes
with Mac OSX. That's not going to work for any rubies that are compiled under RVM. To fix the problem, all I had to
do was download rjb, unzip it, cd into it, and while still in the same rvm gemset, run your installation steps for unix
(minus the sudo, obviously). I could then run irb and "require 'rjb'" without issue.

Thus, I would highly recommend that you break out the windows and mac-specific gems into their own sub-gems. Or, perhaps
create a 'rjb-source' gem that just runs extconf.rb on install.

Thanks, great work.
-Gabe

Add A Comment: Notepad

Please login


Followup

Message
Date: 2011-11-17 00:14
Sender: Antoine Toulme

Buildr had a contribution to fix the problem:
https://issues.apache.org/jira/browse/BUILDR-614

Alternatively:
-you can download the gem from rubygems.org and install the .gem
file while using RVM. It will install correctly then.
-you can do a gem install, forcing to use a particular distrib
of rjb.

Buildr 1.4.7 will fix this problem.
Date: 2011-06-26 01:20
Sender: arton Tajima

Gabe, thanks for your report, it's very helpful for me.

It's headache gem's behavior (it didn't check for the library
version of Windows's gem, but it seems latest gem checks correctly),
although general speaking, people like to install gem without
compilation especially on Windows, also OSX users who don't want
to install XCode.
That's because I can't remove platform specific gems from the
repository.
It seems very nice your suggestion 'rjb-source'.gem.
But at this time, it's not permited by rubygems.org (see below),
so I may mind your suggestion for the next release time. Thank
you.

---------- 
$ mv rjb-1.3.4.gem rjb-source-1.3.4.gem
$ gem push rjb-source-1.3.4.gem 
Pushing gem to RubyGems.org...
Repushing of gem versions is not allowed.
Please use `gem yank` to remove bad gem releases.
$ mv rjb-source-1.3.4.gem rjbsource-1.3.4.gem
$ gem push rjbsource-1.3.4.gem 
Pushing gem to RubyGems.org...
Repushing of gem versions is not allowed.
Please use `gem yank` to remove bad gem releases.

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
resolution_idNone2011-06-26 01:20arton
category_idRjb's2011-06-26 01:20arton