Conversation
|
Could you provide some reproducible test case? I'm trying to reproduce your problem but even by creating some mix encoding paths, I'm not able to: >> Dir["**/*.rb"]
=> ["t€st/\xC3.rb"]
>> Dir["**/*.rb"].map(&:encoding)
=> [#<Encoding:UTF-8>]I suspect there's more to this problem, like a LOCALE issue perhaps. |
|
I'm not exactly sure what causes to use # encoding: ISO-8859-1
module Kernel
alias_method :actual_require, :require
def require(path)
puts "requiring #{path} with #{path.encoding} encoding"
actual_require(path)
end
end
require 'tzinfo/data'My LANG env var is |
Can you provide the entire backtrace then? |
That is whole backtrace, for some reason it doesn't show anything more. Basically this happens when I try to use Metasploit Framework Also note that most of requires work fine, only some deeply in loading when it tries to load Here's full backtrace without Ruby's fix |
|
I'm gonna wait to see how ruby/rubygems#8196 and ruby/ruby#11958 are resolved. |
|
I believe this was fixed upstream. Please correct me if I'm wrong. |
I'm using RVM and my
$HOMEis located at/home/Dāviswhich means GEM path is at/home/Dāvis/.rvm/rubies/ruby-3.3.4/lib/ruby/gems/Currently this causes bootsnap to fail with
This is because
Gem.pathis at["/home/Dāvis/.rvm/rubies/ruby-3.3.4/lib/ruby/gems/3.3.0"]and it's UTF-8 encoded while sometimespathcan be withASCII-8BITencoding.Note that there is similar issue within Ruby aswell, see ruby/ruby#11958