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 125068 - Possibility to create a new gem repository
Summary: Possibility to create a new gem repository
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Gems (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Krauskopf
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-10 21:58 UTC by David Vancouvering
Modified: 2008-02-19 10:14 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Vancouvering 2008-01-10 21:58:00 UTC
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.
Comment 1 dlipin 2008-01-10 23:04:26 UTC
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.
Comment 2 David Vancouvering 2008-01-10 23:54:25 UTC
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.
Comment 3 Petr Jiricka 2008-01-11 08:51:28 UTC
Assigning to Martin to comment on the gem repository in the userdir idea. 

I agree a manual step should not be necessary.
Comment 4 Martin Krauskopf 2008-01-11 10:18:58 UTC
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.
Comment 5 David Vancouvering 2008-01-11 20:46:45 UTC
This really needs to be addressed in 6.1, so the next release of Solaris can have a much smoother experience for Ruby.
Comment 6 David Vancouvering 2008-01-11 20:48:53 UTC
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.
Comment 7 Martin Krauskopf 2008-01-15 11:06:51 UTC
> 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.
Comment 8 David Vancouvering 2008-01-15 19:42:28 UTC
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.
Comment 9 Martin Krauskopf 2008-01-15 20:03:14 UTC
> 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.
Comment 10 Martin Krauskopf 2008-02-19 10:14:10 UTC
Fixed. Not the user is asked at appropriate time for setting up a new repository.

http://hg.netbeans.org/main?cmd=changeset;node=7610452605d6