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

HTTPS Push (Popen : wrong number of arguments) #345

Closed
BAndonovski opened this issue Feb 3, 2015 · 8 comments
Closed

HTTPS Push (Popen : wrong number of arguments) #345

BAndonovski opened this issue Feb 3, 2015 · 8 comments
Assignees
Labels
Milestone

Comments

@BAndonovski
Copy link

This is the set up:

Ruby 1.9
Rails 3.2
Redmine 2.6.1
jbox's redmine_git_hosting plugin

Trying to use git repo through HTTPS. Clone works fine. Push starts and hangs at

Counting objects: 3, done.
Writing objects: 100% (3/3), 206 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)

Apache says the issue is:

App 1013 stderr: [ 2015-02-03 16:33:59.3105 1036/0x0000000782d9b0(Worker 1) utils.rb:68 ]: *** Exception ArgumentError in Rack body object #each method (wrong number of arguments (3 for 1..2)) (process 1036, thread 0x0000000782d9b0(Worker 1)):
App 1013 stderr: from /home/r2d2/.bundler/ruby/1.9.1/grack-971b468103ac/lib/grack/server.rb:78:in popen' App 1013 stderr: from /home/r2d2/.bundler/ruby/1.9.1/grack-971b468103ac/lib/grack/server.rb:78:inblock in service_rpc'
App 1013 stderr: from /usr/lib/ruby/vendor_ruby/rack/response.rb:89:in call' App 1013 stderr: from /usr/lib/ruby/vendor_ruby/rack/response.rb:89:ineach'
App 1013 stderr: from /usr/lib/ruby/vendor_ruby/rack/body_proxy.rb:31:in each' App 1013 stderr: from /var/lib/gems/1.9.1/gems/activerecord-3.2.21/lib/active_record/query_cache.rb:46:ineach'
App 1013 stderr: from /var/lib/gems/1.9.1/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_pool.rb:460:in each' App 1013 stderr: from /usr/lib/ruby/vendor_ruby/rack/body_proxy.rb:31:ineach'
App 1013 stderr: from /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:140:in process_request' App 1013 stderr: from /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:142:inaccept_and_process_next_request'
App 1013 stderr: from /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:110:in main_loop' App 1013 stderr: from /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:448:inblock (3 levels) in start_threads'
@dgeo
Copy link

dgeo commented Feb 3, 2015

@BAndonovski
Copy link
Author

Unfortunately, no. Those are already set as described there.
Besides, I don't think the request even gets that far because of the
exception.

@BAndonovski
Copy link
Author

Any ideas / suggestions / fix-es would be appreciated.

@n-rodriguez This is a great plug in and is really mission critical for me at the moment. A big set up is depending (and currently not working) because of this issue. I'd really appreciate your help on this.
Let's solve the issue and test that donation button if it's working :)

@n-rodriguez
Copy link
Contributor

@n-rodriguez This is a great plug in and is really mission critical for me at the moment. A big set up is depending (and currently not working) because of this issue.

I understand your stress and the emergency of your case but I'm very busy this time :
I've also a business to run and these days it's the first priority.

@n-rodriguez n-rodriguez added the bug label Feb 4, 2015
@n-rodriguez n-rodriguez self-assigned this Feb 4, 2015
@BAndonovski
Copy link
Author

@n-rodriguez I fully understand and appreciate that. Hence my offer of making fixing the bug be worth your while.
Based on the call stack, I expect it to be a pretty quick fix for anyone familiar with the code and really hope you'd find the time to help me out.

@BAndonovski
Copy link
Author

I believe I have solved it. It seems to be working now.
Maybe you can just confirm the ramifications of my fix, am I braking something else, since this has been my first intervention in a ruby code :)

There are a couple of popen calls in the file mentioned in the stack.
Based on the documentation on different ruby versions and expected parameters, I removed the popen_env parameter.

Did a couple of tests now, seems to be working.

@n-rodriguez
Copy link
Contributor

@BAndonovski : actually the issue is your Ruby version :

http://ruby-doc.org//core-1.9.3/IO.html#method-c-popen
http://ruby-doc.org//core-2.1.0/IO.html#method-c-popen

Support of Ruby 1.9.x has ended so I highly recommend you to upgrade to Ruby 2.1 or 2.0.0.

@n-rodriguez n-rodriguez changed the title HTTPS Push HTTPS Push (Popen : wrong number of arguments) Feb 25, 2015
@n-rodriguez
Copy link
Contributor

No more need to edit files. Fixed in commit 73c4d15 (the compatibility patch will be removed with Debian Jessie release)

@n-rodriguez n-rodriguez added this to the v1.0.2 milestone Feb 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants