Skip to content

Commit 06b5fbd

Browse files
committed
Improve warning message when the GEM_HOME/GEM_PATH are misconfigured
1 parent 69dc4f1 commit 06b5fbd

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/main/ruby/truffleruby/core/truffle/gem_util.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,10 @@ def self.upgraded_default_gem?(feature)
9292
def self.verify_gem_paths
9393
bad_dirs = bad_gem_dirs(gem_paths)
9494
unless bad_dirs.empty?
95-
warn "[ruby] WARNING gem paths: #{bad_dirs.join ', '} are not marked as installed by TruffleRuby " +
96-
'(they could belong to another Ruby implementation and break unexpectedly)'
95+
warn "[ruby] WARNING gem paths: #{bad_dirs.join ', '} are not marked as installed by TruffleRuby. " +
96+
'They might belong to another Ruby implementation and break unexpectedly. ' +
97+
'Configure your Ruby manager to use TruffleRuby, or `unset GEM_HOME GEM_PATH`. ' +
98+
'See https://github.com/oracle/truffleruby/blob/master/doc/user/ruby-managers.md'
9799
end
98100
bad_dirs
99101
end

tool/jt.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2312,6 +2312,7 @@ def check_documentation_urls
23122312
https://github.com/oracle/truffleruby/blob/master/doc/user/installing-libssl.md
23132313
https://github.com/oracle/truffleruby/blob/master/doc/user/installing-llvm.md
23142314
https://github.com/oracle/truffleruby/blob/master/doc/user/installing-zlib.md
2315+
https://github.com/oracle/truffleruby/blob/master/doc/user/ruby-managers.md
23152316
]
23162317

23172318
known_hardcoded_urls.each do |url|

0 commit comments

Comments
 (0)