When I try to run the code in the instructions under Create Transactions it does not halt. I think this is because webbtc.com no longer works. So, I tried other sources:
prev_tx = Bitcoin::P::Tx.from_json(open("https://tchain.api.btc.com/v3/tx/#{prev_hash}"))
This results in the following error:
/home//.rvm/gems/ruby-2.2.2/gems/bitcoin-ruby-0.0.18/lib/bitcoin/protocol/tx.rb:404:in from_hash': undefined methodeach' for nil:NilClass (NoMethodError)
from /home//.rvm/gems/ruby-2.2.2/gems/bitcoin-ruby-0.0.18/lib/bitcoin/protocol/tx.rb:425:in `from_json'
prev_tx = Bitcoin::P::Tx.from_json(open("https://api.blockcypher.com/v1/btc/test3/txs/#{prev_hash}"))
This results in the following error:
/home//.rvm/gems/ruby-2.2.2/gems/bitcoin-ruby-0.0.18/lib/bitcoin/protocol/txin.rb:99:in from_hash': undefined method[]' for nil:NilClass (NoMethodError)
When I try to run the code in the instructions under Create Transactions it does not halt. I think this is because webbtc.com no longer works. So, I tried other sources:
prev_tx = Bitcoin::P::Tx.from_json(open("https://tchain.api.btc.com/v3/tx/#{prev_hash}")) This results in the following error: /home//.rvm/gems/ruby-2.2.2/gems/bitcoin-ruby-0.0.18/lib/bitcoin/protocol/tx.rb:404:in /.rvm/gems/ruby-2.2.2/gems/bitcoin-ruby-0.0.18/lib/bitcoin/protocol/tx.rb:425:in `from_json'
from_hash': undefined method
each' for nil:NilClass (NoMethodError) from /home/prev_tx = Bitcoin::P::Tx.from_json(open("https://api.blockcypher.com/v1/btc/test3/txs/#{prev_hash}")) This results in the following error: /home//.rvm/gems/ruby-2.2.2/gems/bitcoin-ruby-0.0.18/lib/bitcoin/protocol/txin.rb:99:in
from_hash': undefined method
[]' for nil:NilClass (NoMethodError)I am using Ruby 2.2.2.