pere.noel
11/25/2006 11:49:00 AM
Paul Lutus <nospam@nosite.zzz> wrote:
> Okay. I successfully ran your code this way:
>
> file = "test.wav"
>
> fxml=file.gsub(/(.*)\.wav/,'\1.xml')
>
> puts fxml
>
> output:
>
> test.xml
>
> So there is nothing wrong with the syntax in the line creating the error
> message.
OK then we agree...
>
> >> What is in RGV[0]? What is the content of the offending line?
> >
> > RGV[0] is a typo of mine, it should be read :
> > ARGV[0]
>
> Please do not retype your code into the newsreader. Instead, copy it
> directly from your programming editor.
Unfortunately i can't anymore, because, on MacOS X, using "System
Events.app" i did something wrong (?) and cut'n paste and drag'n drop
facilities disappeared...
That only in my account if i add another one, for this new account,
cut'n paste and drag'n drop are working as expected...
> This may be the problem -- the code
> in your programming editor may not be identical to the code you have
> posted, because the code you posted runs fine.
yes my code works fine even on another computer which i don't know the
OS version nor the ruby version.
someone gave me (other thread in this group if interested see message
76135, 76138 and 76139 on ruby-talk) it seems to be related to the
shebang i use :
#!/usr/bin/env ruby # [with or without -w]
the args given to a ruby script are miss-interpreted by the SHELL.
I've discovered that today althought i'm using ruby at least since 3
years...
and i'm more or less obliged to use this kind of shebang because the
users i've use /usr/bin/ruby for ruby where i use /opt/local/bin/ruby, i
don't want to change anything -- even the shebang -- between my version
and the version for the users...
>
> / ...
>
> >> But this is speculation without seeing the error line and its context.
> >
> > it was given in the preceeding message, even the line before .
>
> In your first post, you only provdied the single error line (no context).
> Now that I have seen the context and run a test I see there is nothing
> wrong with the code that produces the error message. But there are still
> the issues that (1) you apparently typed your code into the newsreader
> instead of copying it, and (2) you have three Ruby versions installed.
>
> If (1) the code you are running is identical to the code you posted, and (2)
> you are still getting the error message, then (3) you have to get rid of
> two of the three Ruby versions that are now living on your system.
NO definitely NO the first version is the one used by Apple's OS i don't
want to touch it.
then i need at least a second version to play with gems.
the second is mine installed in a proper way by MacPort, this is the one
i'm using generally.
the third is devoted to jRuby and doesn't interfere by anyway with the
others because first it isn't in the PATH, second it's under my HOME,
third it is a somehow "special" ruby for jRuby (ruby 1.8.5 (0) [java])
and lastly the executable files aren't root:admin as owner:group rather
than yvon;yvon.
MacOS X claimed to be a Unix OS then this MUST cohabite nicely.
>
> > both MacPort and SVN-jRuby ones are working and cohabit nicely.
>
> Except that your system will not execute perfectly good code, which means
> the three Ruby versions are not cohabiting nicely -- unless you are typing
> your code instead of copying it.
not all the prob, i've discovered that this morning comes from Apple's
itself since years (2 to 3) and it's really odd.
--
une bévue