Hello, SolRengine: Rails Meets Solana
Introducing SolRengine — an open-source framework of Ruby gems for building Solana dApps with Rails 8. Why we built it, what it does, and what's next.
Why Rails + Solana?
Rails is the most productive web framework. Solana is the fastest blockchain. Until now, nobody has connected them properly.
The default path for Solana dApp developers is Next.js with a pile of adapters. It works, but it’s not the only way. Rails gives you conventions, background jobs, caching, real-time updates, and a mature ecosystem — all things you need when building production dApps.
SolRengine bridges this gap with 7 modular gems that handle the hard parts.
The Gems
| Gem | What it does |
|---|---|
solrengine-auth |
Sign In With Solana (SIWS) — wallet-based authentication |
solrengine-rpc |
Solana JSON-RPC client for Ruby |
solrengine-tokens |
Token metadata + USD prices via Jupiter |
solrengine-transactions |
SOL transfers with confirmation tracking |
solrengine-realtime |
WebSocket account monitoring + Turbo Streams |
solrengine-programs |
Anchor IDL parsing + Borsh encoding |
solrengine |
Meta-gem that bundles everything |
All gems are published on RubyGems and ready to use:
bundle add solrengine
How It Works
The design principle is simple: server-side RPC, client-side signing.
All blockchain reads (balances, tokens, transaction history) happen in Ruby via solrengine-rpc. Transaction signing happens in the browser via @solana/kit and Wallet Standard. This keeps private keys out of the server while leveraging Rails for everything else.
# Fetch a wallet's SOL balance in your controller
client = Solrengine::Rpc::Client.new
balance = client.get_balance(current_user.wallet_address)
# Authenticate with a Solana wallet
class SessionsController < ApplicationController
def create
result = Solrengine::Auth.verify(
signature: params[:signature],
message: params[:message],
public_key: params[:public_key]
)
if result.valid?
user = User.find_or_create_by(wallet_address: result.public_key)
session[:user_id] = user.id
end
end
end
Showcase Apps
We’ve built two apps to demonstrate the framework:
- WalletTrain (source) — A full wallet app with auth, token portfolio, SOL transfers, and real-time updates. 54 passing tests.
- PiggyBank — Time-locked SOL savings using a custom Anchor program. Demonstrates
solrengine-programswith Borsh encoding and IDL parsing.
What’s Next
We’re focused on growing the Solana + Rails ecosystem:
- More showcase dApps (tip jar, token-gated content)
- A blog right here on solrengine.org (you’re reading it!)
- Documentation site
- Solana Foundation grant application
If you’re a Rails developer curious about Solana, or a Solana developer tired of JavaScript fatigue, try the live demo or explore the source.
SolRengine is MIT licensed and built by moviendo.me.