Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #6751

script error when thru ssh only

Date Mon, 25 Feb 2013 14:47:47 +0100
From Une Bévue <unbewusst.sein@fai.invalid>
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130216 Thunderbird/17.0.3
MIME-Version 1.0
Newsgroups comp.lang.ruby
Subject script error when thru ssh only
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
NNTP-Posting-Host 82.226.217.239
X-Original-NNTP-Posting-Host 82.226.217.239
Message-ID <512b6b84@groumpf.org> (permalink)
X-Trace groumpf.org 1361800068 82.226.217.239 (25 Feb 2013 14:47:48 +0100)
Organization Groumpf.org, l'Internet Asocial
Lines 27
X-Authenticated-User yvon
X-Complaints-To abuse@groumpf.org
Path csiph.com!usenet.pasdenom.info!news.franciliens.net!groumpf.org!not-for-mail
Xref csiph.com comp.lang.ruby:6751

Show key headers only | View raw


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.

Back to comp.lang.ruby | Previous | NextNext in thread | Find similar


Thread

script error when thru ssh only Une Bévue <unbewusst.sein@fai.invalid> - 2013-02-25 14:47 +0100
  SOLVED was: script error when thru ssh only Une Bévue <unbewusst.sein@fai.invalid> - 2013-02-26 12:55 +0100

csiph-web