U
Une Bévue
I have a script, say "my_script" returning an error :
/Users/yt/bin/scripts/recette_sources_list.rb:17:in `block in <main>':
invalid byte sequence in US-ASCII (ArgumentError)
stderr : from /Users/yt/bin/scripts/recette_sources_list.rb:16:in
`each_line'
stderr : from /Users/yt/bin/scripts/recette_sources_list.rb:16:in `<main>'
only when executed thru ssh by :
ssh server 'path/to/my_script'
or
ssh server '/path/to/ruby another_path/to/my_script'
no error at all if run directly on server.
the lines :
15 i=1
16 File.open(RECETTES_TOOLKIT).each_line do |line|
17 sources_lines[line.gsub(/^def doc_([a-zA-Z0-9_]+)\(which, html,
url\)$/, '\1').chomp]=i if line =~ /^def doc_/
18 i+=1
19 end
with "RECETTES_TOOLKIT" being another absolute path to another ruby script.
/Users/yt/bin/scripts/recette_sources_list.rb:17:in `block in <main>':
invalid byte sequence in US-ASCII (ArgumentError)
stderr : from /Users/yt/bin/scripts/recette_sources_list.rb:16:in
`each_line'
stderr : from /Users/yt/bin/scripts/recette_sources_list.rb:16:in `<main>'
only when executed thru ssh by :
ssh server 'path/to/my_script'
or
ssh server '/path/to/ruby another_path/to/my_script'
no error at all if run directly on server.
the lines :
15 i=1
16 File.open(RECETTES_TOOLKIT).each_line do |line|
17 sources_lines[line.gsub(/^def doc_([a-zA-Z0-9_]+)\(which, html,
url\)$/, '\1').chomp]=i if line =~ /^def doc_/
18 i+=1
19 end
with "RECETTES_TOOLKIT" being another absolute path to another ruby script.