Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Since rubygems v2.4.2, Windows binstubs for gem executables are generated with a hardcoded path to Ruby. This leads to the binstubs shipping with RailsInstaller-Windows being unusable, because they reference the Ruby path on the maintainer machine, rather than the machine that executed the installer (see railsinstaller#81). This is due to a fix in rubygems, which explicitely hardcodes the Ruby path in the binstubs, to work around a Bundler issue (see rubygems/rubygems#942). The author of the patch notes that it makes Ruby installations non-portable across machines - which is exacly the issue that we encounter there. The intended workaround for people needing portable installations is to re-generate the binstubs locally, by executing `gem pristine --all --executables-only`. This is how this PR implements the fix: it simply re-generates the binstubs with the correct path at the end of the installation. In the future, I may attempt to fix the issue upstream in rubygems, by allowing `--env-shebang` to generate a portable Ruby path again, as it was suggested in the original pull request.
- Loading branch information