Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't change access mode of IO object with zeus #8

Closed
teaforthecat opened this issue Jan 16, 2013 · 3 comments
Closed

can't change access mode of IO object with zeus #8

teaforthecat opened this issue Jan 16, 2013 · 3 comments

Comments

@teaforthecat
Copy link

io.optimize_image( dragonfly_file.tempfile )

.bundle/ruby/1.9.1/gems/image_optim-0.6.0/lib/image_optim/worker.rb:66:in `reopen': /dev/pts/6 can't change access mode from "r+" to "w" (ArgumentError)

using ruby 1.9.3 on ubuntu 12.04
using dragonfly
trying to follow this gist: https://gist.github.com/3320781
but running in rails console also does not work.
Not sure where to start looking into this error. help?

@teaforthecat
Copy link
Author

I'm not sure why /dev/null (or /dev/pts/6 in the error above) are set to read-only for me. Not changing the mode of that IO object fixes the issue.
I'm not sure if this would be the best option, but it is working for me:
teaforthecat@0e95693

@teaforthecat
Copy link
Author

Ah Ha!
I am using zeus, which redirects io. so that is why /dev/pts/6 is readonly.
Is this something you want to address @toy?

@toy
Copy link
Owner

toy commented Jan 16, 2013

Seems you have already found source of problem :)
I think I need to simplify way of starting process, it is simple to change way of redirecting stdout and stderr (2>&1 >/dev/null), changing priority can be done using nice command (which as I understand should be present on all posix system), setting environment variable should be also simple.

@toy toy closed this as completed in b6fa79f Jan 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants