Compatibility and requirements
- Tested with parity 1.5, might work with geth and older parity, but was not tested.
- Tested with solc 0.4.9
- Ruby 2.x
- UNIX/Linux or OS X environment
Currently the only node supported by ethereum.rb is parity. To install parity on mac simply:
$ brew tap ethcore/ethcore $ brew install parity --beta
To install parity on linux download latest package from parity github and install on your computer.
It might work with geth as well, but this configuration is not tested.
To work correctly ethereum.rb needs parity to have at least one wallet configured. Parity should automatically create one for you during installation. You can see the list of wallets by calling:
$ parity account list
And create one with following command:
$ parity account new
$ brew install solidity --beta
In general get used to working on beta versions as ethereum ecosystem evolves quite fast.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install ethereum.rb
Running a node
There is a rake task to run node on testnet network, that you can run from your application directory:
$ rake ethereum:node:test
It will run parity node, unlock the first account on the account list, but you need to supply it with password. To do that adding create file containing password accessable from your parity folder, which should be one of the following:
/Users/you/Library/Application Support/io.parity.ethereumon MacOS
/home/you/.parityon Linux and MacOS for Parity versions older then 1.5.0
Warnning: Running a parity node with unlock wallet is a considerable security risk and should be avoided on production servers. Especially avoid running node with unlocked wallet and enabled json rpc server in http mode.
To send transaction on a testnet blockchain you will need test ether, you can get it here.