On Mon, Jun 15, 2009 at 7:13 PM, Daniel Spiewak <[email protected]> wrote:
> > I'm not sure what non-global has to do with it (or even what it means). > > > I mean installing in /opt (or /usr/local for that matter) and allowing all > users to have access, as opposed to installing in ~/bin or similar. > > > > From the jruby.org web site (but also just about any other JRuby > > documentation I read): > > > > 1. Extract JRuby into a directory. > > 2. Add that directory's bin subdirectory to the end of your path. > > 3. Test it: jruby -v > > > "Yes" to the above, "no" to the below. > > They expect you to add a user writable directory to your path. > > > This really isn't too different from how *any* *nix tool is distributed in > binary form. We've gotten used to most things coming as source with an > autoconf script generating a makefile, but there are still one or two > useful > packages which only provide pre-compiled binaries. In such cases, the > distribution mechanism of choice is *usually* a tarball which is extracted > into the required directory. Why would you need an installer to run two > commands? Because it does the right thing, and when it does the right thing, the right thing happens to more people and more often. $ ls -al _buildr -rwxr-xr-x 1 assaf staff 1.3K Mar 12 23:31 _buildr $ cd buildr $ sudo cp _buildr /usr/bin $ ls -al /usr/bin/_buildr -rwxr-xr-x 1 root wheel 1.3K Jun 15 20:40 /usr/bin/_buildr Or maybe you don't want /usr/bin (OS upgrade will write over it), and you don't want to copy, you prefer symlinks: $ sudo ln -s _buildr /opt/local/bin/ $ ls -al /opt/local/bin/_buildr lrwxr-xr-x 1 root admin 7B Jun 15 20:56 /opt/local/bin/_buildr -> _buildr Same effect. All you need is a properly setup bin directory and place your executables there. It may be accessible only to you or shared with everyone, either way only sudo can change executables. Even if you're the only account with read/write privileges, you're closing a vector of attack.. As a single install step, placing in bin affords you more security than adding odd directories to path. Assaf > > From what I know of the JRuby community, the conventional install follows > one of two paths. For the personal development machine with one user (e.g. > my laptop), it's usually easiest to install JRuby under the home directory, > user read/write where changes can be made as necessary. I've edited the > JRuby startup scripts on more than one occasion, and I used to actually > work > directly from the SVN sources. Both of these tasks are made a lot easier > when I have easy read/write access to JRUBY_HOME. > > The other option is a server or a shared workstation. In either case, the > conventional approach is to install JRuby just like any other *nix package: > in /usr/local or /opt, according to taste. From there, the binaries can be > symlinked into /usr/local/bin, or simply placed on the PATH. > > They (meaning the JRuby team) don't really *expect* one case or another. > They have merely provided the simplest possible setup instructions. I > think > they probably assume that competent *nix hackers will be more than capable > of placing the install wherever they please. Now, Eclipse on the other > hand... ;-) > > Daniel >
