larsch / ocra

One-Click Ruby Application Builder
http://ocra.rubyforge.org/
833 stars 84 forks source link

invalid byte sequence in UTF-8 (ArgumentError) with ocra #187

Closed Koala633 closed 1 year ago

Koala633 commented 2 years ago

I try to convert a sample ruby script to an executable file with the ocra gem.Here is my ruby script.

puts "Hello word"

Gives me the following error when running ocra test.rb

C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/ocra-1.3.11/bin/ocra:34:in `tr': invalid byte sequence in UTF-8 (ArgumentError)
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/ocra-1.3.11/bin/ocra:34:in `to_posix'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/ocra-1.3.11/bin/ocra:57:in `subpath?'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/ocra-1.3.11/bin/ocra:611:in `block (2 levels) in find_gem_files'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/ocra-1.3.11/bin/ocra:609:in `each'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/ocra-1.3.11/bin/ocra:609:in `block in find_gem_files'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/ocra-1.3.11/bin/ocra:597:in `each'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/ocra-1.3.11/bin/ocra:597:in `find_gem_files'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/ocra-1.3.11/bin/ocra:755:in `build_exe'
        from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/ocra-1.3.11/bin/ocra:1231:in `block in <top (required)>'

Im working with windows10 full updated and here is my version of ruby

ruby -v
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x64-mingw-ucrt]

How i can understand this error ?

Thanks

Koala633 commented 1 year ago

Finally the problem was my username on my windows 10 computer.There was a character è so i just changed my username and now it work.

Issue closed.