This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 150586 - Native Ruby "Ruby Gems" Dialog: AssertionError: gemManager is reloaded
Summary: Native Ruby "Ruby Gems" Dialog: AssertionError: gemManager is reloaded
Status: NEW
Alias: None
Product: ruby
Classification: Unclassified
Component: Platform (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: issues@ruby
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-17 21:23 UTC by dkaris
Modified: 2011-01-28 20:12 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 96000


Attachments
stacktrace (6.43 KB, text/plain)
2008-10-17 21:23 UTC, dkaris
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dkaris 2008-10-17 21:23:23 UTC
Build: NetBeans IDE 6.5 Beta (Build 200808111757)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33
OS: Windows XP, 5.1, x86

User Comments:
dkaris: In the "Ruby Gems" dialog, I switched Ruby Platform from JRuby to my native (1.8.6-p114) ruby.

dkaris: In the "Ruby Gems" dialog, I switched Ruby Platform from JRuby to my native (1.8.6-p114) ruby.



Stacktrace: 
java.lang.AssertionError: gemManager is reloaded
        at org.netbeans.modules.ruby.platform.gems.GemPanel.notifyGemsUpdated(GemPanel.java:327)
        at org.netbeans.modules.ruby.platform.gems.GemPanel.access$4200(GemPanel.java:90)
        at org.netbeans.modules.ruby.platform.gems.GemPanel$4$1.run(GemPanel.java:1173)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
Comment 1 dkaris 2008-10-17 21:23:33 UTC
Created attachment 72158 [details]
stacktrace
Comment 2 dkaris 2008-10-17 21:55:10 UTC
My ruby\bin directory contained a "gem.rb" but did not contain a "gem" or "gem.bat" file.  I created "gem" as a copy of
"gem.rb" and "gem.bat" as 

@ECHO OFF
@"ruby.exe" "%~dpn0" %*

This resolved the problem.

Note also, that before this change, the "Ruby Platforms" dialog showed my Gem Tool as "null (1.2.0)"; after this change
it showed "c:\ruby\bin\gem (1.2.0)"
Comment 3 Erno Mononen 2010-04-12 10:51:14 UTC
This issue seems to have gone unnoticed, sorry about that and thanks for posting your solution. The platform manager indeed expects to find a gem  executable, how did you you install RubyGems to your platform? Of course the platform manager should really display a warning rather than throwing an AE, but I assume this isn't a very common case (hence adjusting the priority).
Comment 4 dkaris 2010-04-13 16:35:32 UTC
The whole Ruby environment here is checked in to our source control system, we don't run an installer on individual machines.  Except for Netbeans, there didn't need to be a gem.bat because we had Windows file associations set up for .rb to be run with ruby.exe.  So, from the Windows command line, typing "gem" worked.
Comment 5 Erno Mononen 2010-04-14 10:20:30 UTC
Ah, that clarifies it, thanks. Need to make handling of this kind of cases more robust.