On Thu, Oct 1, 2015 at 4:21 PM, Marvin Humphrey <[email protected]> wrote:
>
> I'm "stuck" at `gem install whimsy-asf`.  Ruby comes with my operating system.
> I don't want to mess with the system installation, which meeds that I need to
> research how to persuade the `gem` tool to install into an arbitrary lib
> directory, then modify some environment var so that ruby knows about the
> custom lib directory, etc.

I've now done the research.

How to persuade the `gem` tool to install into an arbitrary lib directory:

$ export GEM_HOME=/arbitrary/lib/directory

How to modify some environment var so that ruby knows about the custom
lib directory:

$ export GEM_PATH=/arbitrary/lib/directory

 With these two environment variables set, and presuming that you have
configure LDAP, you should be able to:

  gem install whimsy-asf
  ruby examples/board.rb --port=9292

When you are done, feel free to rm -rf /arbitrary/lib/directory.  Or
keep it around for future use.  Note that sudo is not required and
your system configuration is not messed with.

Notes:

1) GEM_PATH is actually a path, so you can specify multiple paths
separated by colons and each will be searched in order.  You can use
the command 'gem env' to see your current path.  If you unset
GEM_PATH, you will likely see an entry like the following:
/Users/rubys/.gem/ruby/2.0.0.

2) gem install will install all necessary dependencies for a single
gem.  Applications that make use of multiple gems typically provide a
file name `Gemfile` that lists the versions of the gems that the
application depends on, and a command `bundle install` is sufficient
to download all necessary dependencies.

3) I haven't done the research for node/npm, but running "npm config
ls -l" leads me to believe that npm is equally as configurable.

> I, and other potential contributors, can surely figure all this out in due
> time -- but I don't think we should have to.  And I feel as though if I
> compromise with you now, guzzle the kool-aid and spend N hours tricking out my
> system, that my point about all these dependencies posing a barrier to entry
> will be lost.

My personal preference is NOT to try to "trick out my system", but
rather to use the tools as others on sites like stackoverflow do.
Generally, I've found that this increases the odds that solutions I
find there work for me.

In cases where I desire additional isolation, I look to running a VM
or a Docker container.

> Marvin Humphrey

- Sam Ruby

Reply via email to