Devendra Chouhan
Devendra Chouhan

Reputation: 141

How do I connect to an Ethereum testrpc Blockchain from Rails?

I have installed testrpc and able to run the demo example (MetaCoin) of trufffle. I want to know if there is a way to use truffle/testrpc in a Ruby on Rails application. Can somebody please help me with these questions.

How to connect to testrpc blockchain running locally on a windows machine from a Rails application?

And

How to use the web3js library in rails?

Upvotes: 1

Views: 724

Answers (3)

q9f
q9f

Reputation: 11834

I have published Ethereum on Rails on Github. It is a demo/template application that allows authenticating Users in your Rails application with an Ethereum wallet (e.g., MetaMask).

Screenshot of the Demo

You can use this repository as a template to create your custom Rails application that already has Ethereum support bundled. It uses ruby-eth gem for Ethereum account management.

Upvotes: 0

zkMarek
zkMarek

Reputation: 5514

If you want to use any Ethereum node with ruby you can use ethereum.rb.

Keep in mind that testrpc is a test node, so it only makes sense to use it when writing tests.

Upvotes: 3

Sundar Pillai
Sundar Pillai

Reputation: 11

I dont know about Rails but for REST based calls Blockapps have REST APIs to interact with Ethereum Blockchain (Strato)...maybe you can try this

Upvotes: 0

Related Questions