Cześć. Korzystam z programu TouchGFX, ale mam problem przy kompilacji pierwszego przykładu. Nie znam się w ogóle na Ruby, jest to tylko jedno z narzędzi z których korzysta TouchGFX.
Tutaj log jaki dostaje przy próbie kompilacji
[…]
C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/default
s.rb:81:in exist?': "\x88" to UTF-8 in conversion from Windows-1250 to UTF-8 (Encoding::UndefinedConversionError) from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/defaults.rb:81:indefault_path’
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/path_support.rb:78:in path=' from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/path_support.rb:34:ininitialize’
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb:365:in new' from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb:365:inpaths’
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb:387:in path' from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:827:indirs’
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:705:in stubs' from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:897:infind_inactive_by_path’
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb:183:in try_activate' from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:132:inrescue in require’
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:144:in require' from d:/TouchGFX/touchgfx-release-4.3.0-eval/touchgfx/framework/tools/textconvert/lib/excel_reader.rb:39:in<top (required)>’
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in require' from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:inrequire’
from d:/TouchGFX/touchgfx-release-4.3.0-eval/touchgfx/framework/tools/textconvert/lib/text_entries_excel_reader.rb:39:in <top (required)>' from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:inrequire’
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in require' from d:/TouchGFX/touchgfx-release-4.3.0-eval/touchgfx/framework/tools/textconvert/lib/generator.rb:39:in<top (required)>’
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in require' from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:inrequire’
from main.rb:41:in `’
make[1]: *** [generated/texts/include/texts/TextKeysAndLanguages.hpp] Error 1
make: *** [assets] Error 2
[quote=“mibi, post:1, topic:10451”]
C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/default
s.rb:81:in exist?’: “\x88” to UTF-8 in conversion from Windows-1250 to UTF-8 (Encoding::UndefinedConversionError)
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/defaults.rb:81:indefault_path’[/quote]
Otwórz proszę ten plik i wklej definicję metody, która obejmuję linię 81 w tym pliku. Według tego stacktrace używana jest wersja rubiego 1.9.3, w której metoda default_path wygląda tak:
# https://github.com/ruby/ruby/blob/ruby_1_9_3/lib/rubygems/defaults.rb#L63-L69
def self.default_path
if File.exist? Gem.user_home then
[user_dir, default_dir]
else
[default_dir]
end
end
(aczkolwiek numery linii się nie zgadzają). Jeśli potwierdzisz, że u Ciebie w linii 81 znajduje się ta linijka:
if File.exist? Gem.user_home then
to wyglądałoby na to, że w nazwie użytkownika masz jakiś dziwny znak.
C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/default
s.rb:81:in `default_path': C:/touchgfx-env/MinGW/msys/1.0/home/micha? (RuntimeEr
ror)
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rub
ygems/path_support.rb:78:in `path='
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rub
ygems/path_support.rb:34:in `initialize'
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rub
ygems.rb:365:in `new'
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rub
ygems.rb:365:in `paths'
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rub
ygems.rb:387:in `path'
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rub
ygems/specification.rb:827:in `dirs'
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rub
ygems/specification.rb:705:in `stubs'
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rub
ygems/specification.rb:897:in `find_inactive_by_path'
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rub
ygems.rb:183:in `try_activate'
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rub
ygems/core_ext/kernel_require.rb:132:in `rescue in require'
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rub
ygems/core_ext/kernel_require.rb:144:in `require'
from d:/TouchGFX/touchgfx-release-4.3.0-eval/touchgfx/framework/tools/te
xtconvert/lib/excel_reader.rb:39:in `'
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rub
ygems/core_ext/kernel_require.rb:55:in `require'
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rub
ygems/core_ext/kernel_require.rb:55:in `require'
from d:/TouchGFX/touchgfx-release-4.3.0-eval/touchgfx/framework/tools/te
xtconvert/lib/text_entries_excel_reader.rb:39:in `'
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rub
ygems/core_ext/kernel_require.rb:55:in `require'
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rub
ygems/core_ext/kernel_require.rb:55:in `require'
from d:/TouchGFX/touchgfx-release-4.3.0-eval/touchgfx/framework/tools/te
xtconvert/lib/generator.rb:39:in `'
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rub
ygems/core_ext/kernel_require.rb:55:in `require'
from C:/touchgfx-env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rub
ygems/core_ext/kernel_require.rb:55:in `require'
from main.rb:41:in `'
make[1]: *** [generated/texts/include/texts/TextKeysAndLanguages.hpp] Error 1
make: *** [assets] Error 2
wcześniej generują się pliki cpp z plików png i wcześniej zajmowało to 2 sekundy a teraz czekałem około minuty.
W ścieżce jest “micha?” więc chyba masz login w windowsie “michał” a nie “michal” jak pisałeś, prawda?
Widzę 2 opcje:
Zmieniasz username na taki żeby nie zawiera litery polskiej
Modyfikujesz kod tamtej metody w taki sposób by zwraca tablicę tylko z katalogiem domyślnym (a w Twoim przypadku zakładam, że własnie tam są instalowane gemy):