On Sep 28, 4:20 pm, Max Dev <[EMAIL PROTECTED]> wrote:
> Thank you for replies.
>
> > Have you looked at what #{ARGV} evaluates to?
> > would ARGV.join(" ") help?
>
> Yes, this works well with a call like:
>
> system (or sh) ("'rails' #{ARGV.join(' ')}")
>
> but not with:
>
> `"'rails' #{ARGV.join(' ')}"`
>
> sh: 'rails'  prova -d mysql: not found
>
> I tried different forms, including with join. My real mistake was that I
> was using the notation ``

There's nothing wrong with using ``, except that you're quoting rather
excessively

`rails #{ARGV.join(' ')}`

is fine, as is

system("rails #{ARGV.join(' ')}")

but `"rails ..."` isn't. `` is already a quoting operator so you don't
need the quotes (which makes the shell believe you want to run a
command called "rails -d mysql some_app" (ie it will look for
something whose filename is that whole string) whereas you want to run
a command called "rails" but passing those arguments.

Fred
>
> What's the difference?
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to