Skip to content
This repository has been archived by the owner. It is now read-only.

This ugly hack makes the pow webserver work with current JRuby 1.7.0 #32

Closed
wants to merge 1 commit into from
Closed

Conversation

haberbyte
Copy link

@haberbyte haberbyte commented Sep 11, 2012

This is a workaround for this issue in pow:

basecamp/pow#14

I know this is very ugly and i have no idea why JRuby throws an IOError exception even though everything is working fine.
This should get fixed in JRuby eventually. But for now, this makes pow usable even for JRuby project, which is great!

@haberbyte
Copy link
Author

haberbyte commented Sep 11, 2012

While debugging this i also noticed the following:

In Ruby MRI:

puts sock.path
=> /tmp/path-to-sock.0

In JRuby (i'm using 1.7.0-preview2):

puts sock.path
=> ""

@josh
Copy link
Owner

josh commented Sep 11, 2012

Thanks for looking into this, but I only plan to support "unixy" based rubies for nack. Jruby doesn't have a good foundation for IO.select and dealing with forked processes.

@josh josh closed this Sep 11, 2012
@haberbyte
Copy link
Author

haberbyte commented Sep 11, 2012

Ok, i understand. I didn't feel good about this "patch" anyway, but...

Do you have a suggestion on how i would make pow work with jruby apps then?
It would be great to have a real "solution" that works without having to edit files manually.

Maybe one can overwrite this behavior within pow itself!?

I'm afraid i have no idea what i'm doing ;)

@josh
Copy link
Owner

josh commented Sep 11, 2012

I think the best thing would be to use Pow's proxy to port feature. Start up your jruby app on port 1234, then do echo 1234 > ~/.pow/myjrubyapp.

@jpfuentes2
Copy link

jpfuentes2 commented Sep 12, 2012

Josh, I think, on the contrary, that JRuby has much better support for UNIX sockets including IO.select now. This seems to be a bug with the new UNIXSockets lib they're using.

Regardless, this code doesn't belong in your project. I'll try to write up an example and submit it to JRuby bugs.

@matpowel
Copy link

matpowel commented Jan 3, 2013

@jpfuentes2 thanks very much for chasing that, there's a lot of us that would love to run JRuby under pow!

@mrbrdo
Copy link

mrbrdo commented Jul 11, 2013

Was this fixed? I'm experiencing this issue. (IOError: Socket is not connected)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
6 participants