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.
The Ruby gem repository at /opt/netbeans-6.0/ruby1/jruby-1.0.2/lib/ruby/gems/1.8 is not writeable by anyone by root. As a result, when you do Tools->Gems, you get an error message saying it's not writeable and you can't manage your gems. The workaround is to manually make it writeable, but it shouldn't be this way.
As far as I see this directory (.../gems/1.8) has drwxr-xr-x permissions either using ZIP distribution or by using NetBeans Installer so it is unlikely the installer issue. Moreover, I guess that it is correct behaviour : if NetBeans was installer (or unzipped) by root then the user would not be able to write there. I am not sure what exactly this error means and what it says: in general, all the settings should not be stored in netbeans installation directory but in the netbeans userdir. Reassigning to ruby for the futher evaluation.
I agree that it does seem odd for us to be writing stuff directly into the NetBeans directory. Perhaps the Ruby module should chain on a gem repository that is in the userdir? Not sure how feasible this is. But currently, the gem repository is where it is, and the user should not have to take a manual step to make the repository writeable before they can start using JRuby on Solaris.
Assigning to Martin to comment on the gem repository in the userdir idea. I agree a manual step should not be necessary.
I agree with dlipin. If you install the NetBeans a root, then only root might install new gems or however touch the installation. If you as a root do not want this give other users permission to do so. This is like with RubyGems installation and actually other software. There are already issues for supporting custom GEM_HOME and GEM_PATH. I'm also thinking about "possibility to create a new gem repository". So making this issue to be such an RFE, since it is not tracked anywhere yet. Not sure about TM, so leaving TBD.
This really needs to be addressed in 6.1, so the next release of Solaris can have a much smoother experience for Ruby.
Note, Tor has suggested another solution, using 'gksu', which will prompt the user for the root password. Chaining a userdir repository seems better to me, as that way I don't have to keep on typing in the root password, and it seems better than putting user-loaded gems in a directory under NetBeans install. What if, for instance, two different users want to use NetBeans, they'll end up having to share the gem repository.
> What if, for instance, two different users want to use NetBeans, they'll end up having to share the gem repository. This is rather Unix-administration question. Probably the most usual use-case is one person per computer. Then it is OK even today, just install NetBeans in a userdir. But will be even smoother when we implement this issue. I personally have a group like 'developers' or 'powers' which has access(GID) to places like "/space/java", "/space/ruby". So any user which is in the group, can write to the NetBeans installation directory. Or to "/space/ruby/gem-repo". So the NetBeans might reside in root-write-only directory with GemHome pointing to the gem-repo shared by all developer who are using the system.
Just to be clear, you can't "just install NetBeans into a user dir" because SXDE installs NetBeans automatically, and it *has* to go into the ARC-approved location of /opt/netbeans-6.0. And it is installed as root, you can't do much about that. I really don't think it makes sense to put user data into the NetBeans install tree.
> Just to be clear, you can't "just install NetBeans into a user dir" because SXDE installs NetBeans automatically Yup, same as in Linux distros. I meant NB .zip distro to install to userdir. But I understand your case. > I really don't think it makes sense to put user data into the NetBeans install tree. That's clear. I just offered the solution until this gets fixed.
Fixed. Not the user is asked at appropriate time for setting up a new repository. http://hg.netbeans.org/main?cmd=changeset;node=7610452605d6