Steem Blockchain Data Service Rails Engine
Ruby on Rails Engine for accessing Steem Blockchain Data Service.
The sbds project is the official database layer for accessing a local, read-only version of the Steem blockchain. It is developed and maintained by Steemit, Inc. and can be confugured to use SQLite, Postgres, and MySQL.
This gem
allows you to access an sdbs
instance with ActiveRecord
.
Installation
For Existing Rails Projects
Assuming you already have an existing rails project, add this line to your application's Gemfile:
gem 'sbds-rails', require: 'sbds'
And then execute:
$ bundle install
Edit database.yml
and use your own sbds
database or try out @furion's:
default: &default
adapter: mysql2
encoding: utf8
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
username: steemit
password: steemit
host: sbds-mysql.steemdata.com
database: sbds
For New Projects
Have a look at this article on setting up a new rails project, then use the steps above to enable this plug-in.
How to Write a Ruby on Rails App for STEEM
Tests
- Basic tests can be invoked as follows:
rake
- To run tests with parallelization and local code coverage:
HELL_ENABLED=true rake
Get in touch!
If you're using sbds-rails, I'd love to hear from you. Drop me a line and tell me what you think! I'm @inertia on STEEM.
License
I don't believe in intellectual "property". If you do, consider sbds-rails as licensed under a Creative Commons License.
Man, you're making me really miss the Ruby and RoR days.
Thank you for making this gem.
BTW, have you tried deploying sbds on your own? What is your experience with it on Postgres?
I have had problems running sbds on macOS. I've only gotten it to work on docker, so that got me sqlite. I'm going to have to try installing it again to see exactly what the issue is so I can report it.
This is incredibly awesome!
Thanks for this. I really wanted to host my own copy of the Steem blockchain. :D
Thank you.
nice post @inertia,upvote and followed.
@inertia
Very concise and well written analysis!
Upvoted!
Quite the Gem, well done !
This Github is still updating. great...