James West wrote:
> Hi,
> Depenbding on whether running under windows or unix/mac I obviously need
> to use the \ instead of the / character for shell commands so I have 2
> questions really
> 1) I would love to know if anyone has a neat way of dealing with
> converting paths to use '\' instead of '/' for use with command line
> calls like command and backtick?

path.gsub('/', '\\')

Actually, you may need 4 backslashes instead of 2; Ruby does weird thing 
with backslashes.  But that should get you going.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
-- 
Posted via http://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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to