[Rails] Re: Invoking browser from Ruby script with URL argument: How?
Hi Fred,
I'm happy our paths crossed again.
The launchy gem looks cool. The page I found it on also advertised
Process Explorer from SysInternals that replaces Window's
StartMenu ... something I've wanted for a long time. So, it's a
double-hitter.
Thanks and best wishes,
Richard
On Aug 8, 5:39 pm, Frederick Cheung <frederick.che...@gmail.com>
wrote:
> On Aug 8, 10:08 pm, RichardOnRails
>
> <RichardDummyMailbox58...@USComputerGurus.com> wrote:
> > Colin,
>
> > > exec "firefox #{address}"
>
> I don't think this would work on a max, since GUI apps aren't normally
> in $PATH. You might be interested in the launchy gem.
>
> Fred
>
>
>
>
>
>
>
> > You're my hero!! I couldn't think of what command I could use to
> > invoke the browser on my machine. I wish I had possessed enough
> > imagination to at least try that idea before posting my question. I
> > did harbor the fancy of poking through Rails source code, thinking I
> > might find a clue there. But that seemed daunting to me.
>
> > Best wishes,
> > Richard
>
> > On Aug 8, 4:32 pm, Colin Law <clan...@googlemail.com> wrote:
>
> > > On 8 August 2011 19:10, RichardOnRails
>
> > > <RichardDummyMailbox58...@uscomputergurus.com> wrote:
> > > > Hi,
>
> > > > I've got the folowing script:
> > > > require "fileutils"
>
> > > > path = "K:/_Utilities/Apache/xampp/"
> > > > FileUtils::cd path
> > > > names = Dir.glob("**/index.html")
> > > > (0..4).each { |i|
> > > > name = names[i]
> > > > address = "file://" + path + name
> > > > puts address
> > > > exec address
>
> > > Possibly
> > > exec "firefox #{address}"
>
> > > Colin
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home