TuskLang Logo PNT

TuskLang for
Ruby

Build elegant, expressive configurations for Ruby applications. Embrace developer happiness with metaprogramming and DSL capabilities directly from your config files.

gem
Package Manager
2min
Setup Time
Ruby 3+
Ruby Version

Why Ruby Developers Choose TuskLang

Replace static YAML configs with expressive, Ruby-powered configuration files that embrace developer happiness.

@

@ Operators for Ruby

Execute Ruby code, leverage metaprogramming, and create beautiful DSLs directly from configuration files using powerful @ operators.

ActiveRecord

Database Integration

Native ActiveRecord, Sequel, and Ruby database gem support. Query your database directly from config files with Ruby elegance.

Developer Happiness

Built with Ruby\'s philosophy of programmer happiness. Intuitive syntax, expressive code, and delightful development experience.

Rails & Sinatra Integration

Drop-in integration for Ruby on Rails, Sinatra, and other Ruby frameworks. Initializers and configuration helpers included.

DSL Capabilities

Create beautiful domain-specific languages for configuration. Ruby\'s metaprogramming powers meet intelligent configuration.

RSpec

RSpec Testing

Built-in RSpec and Minitest support with test helpers and mocking utilities for testing configurations and @ operators.

Elegant Configuration

Traditional YAML configs are static files. TuskLang configs are elegant, expressive Ruby-powered configurations.

  • 💎 Native Ruby integration
  • ✨ Metaprogramming support
  • 🎨 Beautiful DSL syntax
  • 🔄 Hot reloading
  • 💎 RubyGems ready
config.tsk
# Smart Ruby Configuration
app_name: "MyRubyApp"
environment: @env("RAILS_ENV", "development")

# Database with ActiveRecord integration
database {
    adapter: "postgresql"
    url: @env("DATABASE_URL")
    pool: @query("SELECT COUNT(*) FROM pg_stat_activity") + 5
    timeout: @optimize("db_timeout", 5000)
}

# Redis configuration with connection pooling
redis {
    url: @env("REDIS_URL", "redis://localhost:6379")
    pool_size: @learn("optimal_redis_pool", 25)
    namespace: @cache("1h", "myapp_#{Rails.env}")
}

# Feature flags with A/B testing
features: @env("RAILS_ENV") == "production" ? 
    @query("SELECT name FROM features WHERE enabled = true") :
    ["debug_mode", "developer_tools"]

Ruby Ecosystem Integration

Works seamlessly with your favorite Ruby frameworks and gems

Rails

Web application framework

Sinatra

DSL for web applications

Hanami

Modern web framework

Roda

Routing tree framework

Grape

REST-like API framework

Padrino

Elegant Ruby framework

Get Started in Minutes

Install TuskLang for Ruby and start building elegant, expressive configurations

1 Install via RubyGems

gem install tusklang

2 Create your configuration

# config.tsk
app_name: "MyRubyApp"
environment: @env("RAILS_ENV")

3 Load in your Ruby app

require \'tusklang\'
config = TuskLang.load(\'config.tsk\')
Complete Guide View Examples