Stream: social
Topic: profile...
Erich Schulz (Jun 29 2016 at 01:32):
heh google is clever isn't it... turns out I have a profile
Erich Schulz (Jun 29 2016 at 01:32):
seems like a hundred years ago
Erich Schulz (Jun 29 2016 at 01:32):
shame Read codes were such a flop
Grahame Grieve (Jun 29 2016 at 01:35):
can a few people who use osx please run this command in the terminal:
whereis ruby
Grahame Grieve (Jun 29 2016 at 01:35):
and report the output there please
Jim Steel (Jun 29 2016 at 01:35):
/usr/bin/ruby
Michael Lawley (Jun 29 2016 at 06:15):
/usr/bin/ruby
ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]
David Hay (Jun 29 2016 at 07:28):
/usr/bin/ruby
Pascal Pfiffner (Jun 29 2016 at 07:34):
$ whereis ruby /usr/bin/ruby $ which ruby /usr/local/bin/ruby
nicola (RIO/SS) (Jun 29 2016 at 07:34):
use rvm :)
Grahame Grieve (Jun 29 2016 at 11:25):
I have to launch a ruby GEM from Java. There seems to be no cross-platform standard way of doing it
Erich Schulz (Jun 29 2016 at 11:26):
is that like when my 15 yo "has to" go out see his friends?
Erich Schulz (Jun 29 2016 at 11:31):
assume you've seen this @Grahame Grieve ?
Grahame Grieve (Jun 29 2016 at 11:34):
I have. I don't need to have insight into the ruby program, just run it using ProcessBuilder. I just have to know where the executable is
Erich Schulz (Jun 29 2016 at 11:35):
loop over all the usual suspects?
Bill Dailey, MD (Jun 29 2016 at 11:52):
/usr/bin/ruby
Grahame Grieve (Jun 29 2016 at 12:01):
well, obviously that's a pretty regular thing. Is /ur/bin/ruby a fle in a directory, or a directory?
Pascal Pfiffner (Jun 29 2016 at 12:40):
$ file /usr/bin/ruby /usr/bin/ruby: Mach-O universal binary with 2 architectures /usr/bin/ruby (for architecture x86_64): Mach-O 64-bit executable x86_64 /usr/bin/ruby (for architecture i386): Mach-O executable i386
Pascal Pfiffner (Jun 29 2016 at 12:40):
Could you just use $(which ruby)
to find out where ruby is, then call it?
Grahame Grieve (Jun 29 2016 at 12:41):
how would I do that from Java code?
Igor Sirkovich (Jun 29 2016 at 14:08):
/usr/bin/ruby
James Agnew (Jun 29 2016 at 14:48):
If you're looking to execute Ruby from Java, probably the easiest way would be to use Commons-Exec and just feed it a command line of "ruby blah blah". I believe it'll take care of figuring out where ruby is on your given platform.
Grahame Grieve (Jun 29 2016 at 20:46):
hmm, I'll look at that though it's not obvious how to capture stdout using that
Grahame Grieve (Jun 29 2016 at 21:05):
@James Agnew - I'm stumped. In commons.exec, I provide an input stream. That's different to process builder which gives me the stream. I don't understand how to set it up to push content to my System.out as it comes out of the process i run
James Agnew (Jun 29 2016 at 21:44):
Hmm, I have a project on my laptop home that does exactly that, I'll dig it up in a couple of hours when I get home and see how it does that..
Grahame Grieve (Jun 29 2016 at 21:50):
ok thanks
Last updated: Apr 12 2022 at 19:14 UTC