I want to deploy a smart contract on Ganache blockchain. As a backend, I want to make use of Ruby. I tried ethereum.rb, and I am able to read the basic account information on Ganache using the following code:
require 'ethereum.rb'
client = Ethereum::HttpClient.new('HTTP://127.0.0.1:7545')
blockNumber = client.eth_block_number
balance = client.get_balance("0x9040DD204B561700e2D08bDCBE5215c976F059d4")
puts blockNumber["result"].to_i(16)
puts "Balance: ", balance
Later, I found that ethereum.rb only supports OpenEthereum, and thus maybe for that reason I wasn't able to create or read smart contracts using it.
What options do I have to connect Ruby with Ganache?
You can use the eth gem.
It also has full smart contract support:
Feel free to submit a ticket if you think there is any API missing or not working.