On Feb 22, 3:12 am, Stewart
<stewart.mathe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hey,
>
> how can i run console commands form my rails app. I have tried using
> backticks. eg
>
> result = `svn checkout <url> <path>`
>
> They work fine when i run the sciprt from the command line with
>
> ruby something.rb
>
> but when the same script is run form my rails app nothing happens. It
> seems the commands are ignored. Does anyone know a different way of
> doing this with out backticks or a solution for getting around this
> problem.
>
Have you looked at what result is when it doesn''t work ? Could it just
be that the working directory isn''t what you expect it to be and so
the checkout happens somewhere else? Another possibility is that the
shell spawned to execute your command somehow inherits a different
environment (eg $PATH) and so it can''t find the svn command.
Fred
> Thanks in advance,
> Stewart
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---