Talk:Ruby

From ArchWiki
Jump to navigation Jump to search

Jruby

Should jruby be mentioned on this page? It's supposedly ruby 2.3 compatible. -- Alad (talk) 16:31, 27 August 2017 (UTC)

GEM_HOME

Bundler doesn't respect the gem --user-install configuration, that is something that has been brought multiple times upstream. 1 2 34. Clean solutions have been proposed 5 but they just get ignored.

The latest unlocked and unclosed ticket (so far) 6 does not have a clear solution in sight.

However, we can achieve the same result as this fix, by manually exporting the GEM_HOME environment variable:

export GEM_HOME=$(ruby -e 'puts Gem.user_dir')

This way both bundler and gem install gems to the correct location.

A version of this was suggested as workaround in issue 2565.

It should have been possible to simply add this to a system-wide /etc/profile.d/ruby.sh, so that users don't manually have to do this configuration, but the request was closed on the grounds that "upstream will fix this" (even though they haven't managed to do so for more than ten years).

In the meantime (hopefully before 2030) we can tell users to do this workaround with these changes. Now the location where bundler installs to is fixed.

FelipeC (talk) 00:27, 7 December 2020 (UTC)