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

[PATCH] Specifying just --username results in undefined method `gsub' for nil:NilClass (NoMethodError) #9

Open
devurandom opened this issue Apr 10, 2013 · 1 comment

Comments

@devurandom
Copy link
Contributor

 # ./cellminer --username USER POOL_URI
/usr/lib64/ruby/1.9.1/uri/common.rb:304:in `escape': undefined method `gsub' for nil:NilClass (NoMethodError)
        from /usr/lib64/ruby/1.9.1/uri/common.rb:623:in `escape'
        from /root/cellminer/bitcoin.rb:48:in `rpc_proxy'
        from /root/cellminer/cellminer.rb:120:in `initialize'
        from ./cellminer:24:in `new'
        from ./cellminer:24:in `<main>'
@devurandom
Copy link
Contributor Author

PATCH:

diff --git a/bitcoin.rb b/bitcoin.rb
index 81d7b9f..119d1c6 100644
--- a/bitcoin.rb
+++ b/bitcoin.rb
@@ -45,6 +45,9 @@ module Bitcoin
     # This is a workaround; URI needs escaped username and password
     if username
       uri.user     = URI.escape username, /[^#{URI::PATTERN::UNRESERVED}]/
+      uri.password = ''
+    end
+    if password
       uri.password = URI.escape password, /[^#{URI::PATTERN::UNRESERVED}]/
     end

devurandom added a commit to devurandom/cellminer that referenced this issue Apr 10, 2013
Eligius does not require a password, so make it default to the empty string.
devurandom added a commit to devurandom/cellminer that referenced this issue Apr 23, 2013
* patch-2:
  Empty passwords do not work for Eligius
  Fix issue verement#9
devurandom added a commit to devurandom/cellminer that referenced this issue Apr 23, 2013
* patch-2:
  Empty passwords do not work for Eligius
  Fix issue verement#9
devurandom added a commit to devurandom/cellminer that referenced this issue Apr 23, 2013
* patch-2:
  Empty passwords do not work for Eligius
  Fix issue verement#9
devurandom added a commit to devurandom/cellminer that referenced this issue Apr 23, 2013
* patch-2:
  Empty passwords do not work for Eligius
  Fix issue verement#9
devurandom added a commit to devurandom/cellminer that referenced this issue Apr 23, 2013
* patch-2:
  Empty passwords do not work for Eligius
  Fix issue verement#9
devurandom added a commit to devurandom/cellminer that referenced this issue Apr 23, 2013
* patch-2:
  Empty passwords do not work for Eligius
  Fix issue verement#9
devurandom added a commit to devurandom/cellminer that referenced this issue Apr 24, 2013
Eligius does not require a password, so make it default to the same value that bfgminer uses: -1 (Eligius ignores this anyway)
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

1 participant