Installing Rubinius would print "BUILD FAILED" at the `bundle` step but
the installation would proceed nevertheless and finish successfully.
It turns out that the `command ...` expression will trigger the ERR trap
on failure even when it's a part of `||` list or a condition inside an
`if` statement. This defies how the ERR trap is supposed to work, so the
workaround is to execute it in a subshell which doesn't inherit the ERR
trap of its parent.
Because OS X Mountain Lion removed X Windows, compiling Ruby 1.8 would
fail unless the user installed XQuartz manually and passed:
CPPFLAGS=-I/opt/X11/include rbenv install 1.8.7-p374
This auto-detects if `/opt/X11/include` is present on the system and
configures CPPFLAGS accordingly. However if XQuartz was never installed,
we simply configure Ruby using `--without-tk`.
Fixes#193#207
References 353246926c
The problem wasn't in quoting as per 0b5206172, but in the fact that
Ruby trunk added a LDFLAGS checker that aborts if any of the paths
listed in it are missing:
3636f8c0f5
This is probably a bug in Ruby, but for now a simple workaround is to
iterate through paths in LDFLAGS and ensure they exist.
References #441
Some Rubies need Rake or Bundler for the installation process. However,
since the host Ruby version might not have those gems installed, install
them in a temporary GEM_HOME and add their executables to PATH.
Fixes#426
When installing mruby-dev, the cp command doesn't use the force flag.
This causes an issue when using a custom build configuration (via
MRUBY_CONFIG environment variable) and installing mrbgems from Github,
as the pack files in the git repositories are read-only.
Previously, if `http get` failed, the `download_tarball` function would
still continue since the ERR trap had no effect at that point.
Given a script in the form of `{ ... } || return 1`, the expressions
that are the part of the first group are not subject to ERR trap since
they are non-last in a chain of expressions.
However, since we still can't count on the ERR trap taking effect in
this phase, better just rewrite the function to manually abort.
Fixes#394
`tar` on OS X auto-detects the type of compression used, so it doesn't
care whether `-z` or `-j` flags were passed to it for extraction.
However, since latest Rubinius archives are compressed with bzip2, we
must handle this distinction explicitly for the sake of other platforms.
fixes#470
Rubinius 2 insists that it installs RubyGems binstubs into
`PREFIX/gems/bin` instead of `PREFIX/bin`.
This creates complexity for rbenv rehash and exec processes, so we
symlink `gems/bin` into `bin` and have RubyGems create binstubs at a
location that is consistent with other Ruby implementations.
See sstephenson/rbenv#178, sstephenson/rbenv#461
This causes tricky issues with Bundler. Bundler assumes that the
configure gem path *only* contains gems. When using this configuration
option, this is not the case.
What happens is that Bundler then removes the path for the Ruby stdlib
from the load path, because it is located inside what is configured as
the gems directory. This then breaks for example Rails applications when
using ruby-build to build Rubinius.
Also see: https://github.com/rubinius/rubinius/issues/2544
if RUBY_BUILD_CACHE_PATH is set, create and maintain a local bare git
repository in this location. The name of the git repository is based
on the git URL, so it will be shared between branches.