All -
Can anyone explain why Resolv.getaddress would not work in JRuby?
Some commands and their output to illustrate are at
Illustrates that Resolv.getaddress appears to not work in JRuby 1.7.1. · GitHub.
Thanks,
Keith
Keith R. Bennett
All -
Can anyone explain why Resolv.getaddress would not work in JRuby?
Some commands and their output to illustrate are at
Illustrates that Resolv.getaddress appears to not work in JRuby 1.7.1. · GitHub.
Thanks,
Keith
Keith R. Bennett
On Fri, Jan 4, 2013 at 12:52 PM, Keith B. [email protected]
wrote:
Can anyone explain why Resolv.getaddress would not work in JRuby?
I just tried your example with JRuby 1.7.0, 1.7.1, and 1.7.2 and it
worked identically – i.e. successfully – to MRI.
(With Mac OS java version “1.6.0_37”)
Not sure what to suggest :-/
–
Hassan S. ------------------------ [email protected]
twitter: @hassan
Works for me too on 1.7.1. Ubuntu 10.04.4 LTS, java version “1.6.0_26”
On Fri, Jan 4, 2013 at 3:21 PM, Hassan S.
<[email protected]
If you run “rvm get stable” that should allow you to install jruby
1.7.2.
Wow, this is really weird. I tried it on 2 Macs (both running Mountain
Lion), 1 Linux box, a Linux VM, with bash and zsh, Java 1.6 and 1.7,
JRuby 1.7.0 and 1.7.1, with my cable and cell phone Internet
connections, and could not get it to work on any. Interestingly, the
error I got on 1.7.0 was different from 1.7.1. On 1.7.0 I got this (see
Illustrates problems I'm having using Resolv.getaddress with JRuby. · GitHub):
SocketError: recv: name or service not known
All JRuby installations were rvm installations.
I’m looking forward to 1.7.2 being supported by rvm so I can test that.
Does anyone know if I can install from the tar file and easily uninstall
it later?
Thanks,
Keith
Keith R. Bennett
Alex -
Thanks for that! I wouldn’t have expected that the known rubies would
be hard coded into the local rvm installation and not discoverable over
the Internet. (Is that the case?)
I did indeed install it, and got the same error with 1.7.2. The error I
got was the same as 1.7.0, so the message I described before as a 1.7.0
message was really the Linux error message, I think.
Tried 1.7.2 on Mac OS and Linux. Same error.
Keith R. Bennett
Keith B. wrote in post #1091075:
All -
Can anyone explain why Resolv.getaddress would not work in JRuby?
Some commands and their output to illustrate are at
Illustrates that Resolv.getaddress appears to not work in JRuby 1.7.1. · GitHub.
Just pointing out that you are executing “ruby” and not “jruby” in your
examples. However, I am not familiar with “rvm” so being able to do this
may be a feature in that product.
/Claus
Claus -
rvm maps the standard Ruby and Rails executables (ruby, irb, rake, gem,
rails) to their JRuby equivalents so that you can treat JRuby and other
Rubies identically. That’s one of the things I love about it – no more
need for jruby or jruby -S command_name:
[1] 10:03 mbp-15 /Users/keithb/.rvm/rubies/jruby/lib
rvm jruby
[0] 10:03 mbp-15 /Users/keithb/.rvm/rubies/jruby/lib
ruby -v
jruby 1.7.2 (1.9.3p327) 2013-01-04 302c706 on Java HotSpot™ 64-Bit
Server VM 1.6.0_37-b06-434-11M3909 [darwin-x86_64]
You can check it out at https://rvm.io/ if you want. It only works on
Unix-based OS’s though.
Keith R. Bennett
On Fri, Jan 4, 2013 at 10:38 PM, Keith B. [email protected]
wrote:
All JRuby installations were rvm installations.
I’m looking forward to 1.7.2 being supported by rvm so I can test that.
I should mention that my successful tests using 1.7.0, 1.7.1, and
1.7.2 were all using rvm on Mac. So I don’t think that’s relevant.
You can always do a simple install by untarring and setting up
symlinks and/or PATH values to use that version. That’s how I
worked before rvm
Hassan S. ------------------------ [email protected]
twitter: @hassan
what about just trying jruby without rvm - since it works with me
using jruby-complete.jar jars.
I am stumped on this, and have spent way more time on it than I wanted
to. A StackOverflow message suggested using IPSocket.getaddress
instead, and it works perfectly, so that’s what I’m going to use:
rvm jruby
ruby -e “require ‘socket’; puts IPSocket.getaddress ‘cnn.com’”
157.166.226.25
Keith R. Bennett
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs