# Supported in Ruby

This page lists the Ruby libraries, frameworks and build tools Niro was tested against, and whether it recognised each one.

**What the marks mean.**

- **Supported:** Niro recognised every way of using it that the test code tries.

- **Partly:** Niro recognised some of those ways, or recognised one only in part.

- **Not yet:** Niro did not recognise it in the test code.

The test code is made up for the purpose: one small service per library, with the names invented. So "supported" means Niro recognised it there. It is good evidence, but it is not a promise about every codebase. If Niro misses something in your code, the coverage audit reports the gap on its own (see [Coverage audit](https://help.niroai.dev/cli/coverage-audit-and-consent/)).

## Web frameworks and HTTP servers (the routes your code serves)

5 supported, 3 partly, 3 not yet.

| Name | Status | Ways of using it that were tested |
| --- | --- | --- |
| AWS SAM template.yaml | supported | yes: AWS::Serverless::Function (Runtime ruby3.3, Handler file.method under CodeUri) with Events Type HttpApi or Api Path and Method |
| cuba | not yet | no: Cuba.define do on get, "vendors" do ... end end |
| grape | partly | partly: resource :shipments with version "v1", using: :path and prefix :api |
| hanami | supported | yes: class Routes < Hanami::Routes with get "/stores", to: "stores.index" and scope |
| padrino | not yet | no: App.controllers :reviews do get :index ... post :create, map: "/reviews" end |
| rails | partly | yes: get "/orders", to: "orders#index" in config/routes.rb yes: get "orders/:id" written without a leading slash yes: get "/legacy/orders" => "orders#legacy" no: resources :carts, only: [...] expands to the REST routes yes: namespace :admin do get "reports" ... end prefixes /admin yes: scope path: "/v1" do ... end yes: match "/checkout", to: ..., via: [:get, :post] yes: root "home#index" |
| roda | not yet | no: route do \|r\| r.on "wishlists" do r.get true ... end; r.is "health" ... end |
| Serverless Framework serverless.yml | supported | yes: functions.<name>.handler file.method with events httpApi or http |
| sinatra | supported | yes: top-level get "/tickets" do ... end in a classic app yes: class X < Sinatra::Base with get/delete blocks |
| sinatra-contrib | partly | partly: namespace "/api" do get "/status" end (Sinatra::Namespace) |
| Vercel Functions (Ruby runtime, /api directory) | supported | yes: api/<name>.rb defining Handler = Proc.new do \|request, response\|: the file path is the route, every verb yes: api/<name>.rb defining class Handler < WEBrick::HTTPServlet::AbstractServlet with do_GET/do_POST: verbs from the do_ methods yes: api/wishlists/[id].rb: a bracketed file name is a dynamic path segment |

## The language's own HTTP server

0 supported, 1 partly, 2 not yet.

| Name | Status | Ways of using it that were tested |
| --- | --- | --- |
| drb | not yet | no: DRb.start_service("druby://host:port", front_object) |
| rack | not yet | no: def call(env) branching on env["PATH_INFO"] and env["REQUEST_METHOD"] no: Rack::Request#get? and #path_info == "/gift-cards" no: map "/admin/ping" do run lambda end in config.ru or Rack::Builder |
| webrick | partly | no: server.mount_proc "/receipts" do \|req, res\| ... end yes: server.mount "/refunds", RefundServlet where the servlet defines do_GET / do_POST |

## HTTP client libraries (the calls your code makes to other services)

2 supported, 7 partly, 1 not yet.

| Name | Status | Ways of using it that were tested |
| --- | --- | --- |
| activeresource | not yet | no: class X < ActiveResource::Base; self.site = base; X.find(:all) is GET /products.json |
| excon | partly | yes: Excon.get(absolute url) partly: Excon.new(base).get(path: "/receipts") no: conn.request(method: :post, path: ...) |
| faraday | partly | no: Faraday.new(url: base) then conn.get(relative path) partly: conn.post(path) do \|req\| req.body = ... end yes: Faraday.get(absolute url) partly: Faraday.new(ENV.fetch("RODA_URL")) with the value in docker-compose no: conn.run_request(:delete, path, body, headers) |
| http (http.rb) | partly | yes: HTTP.get(url) yes: HTTP.auth(token).post(url, json: ...) no: HTTP.persistent(base) do \|http\| http.get(path) end |
| httparty | partly | yes: HTTParty.get(absolute url) no: include HTTParty; base_uri "..."; self.class.get(path) |
| httpclient | supported | yes: HTTPClient.new.get(url) and .post(url, body) |
| httpx | supported | yes: HTTPX.get(url) and HTTPX.post(url, json:) |
| rest-client | partly | yes: RestClient.get(url) and RestClient.post(url, payload, headers) yes: RestClient::Resource.new(base) ["vendors"].get no: RestClient::Request.execute(method: :delete, url: ...) |
| several (main project) | partly | partly: main calls a server in each framework through a different client form |
| typhoeus | partly | yes: Typhoeus.get(url) no: Typhoeus::Request.new(url, method: :post).run no: hydra.queue(Typhoeus::Request.new(url)); hydra.run |

## The language's own HTTP client

0 supported, 2 partly, 1 not yet.

| Name | Status | Ways of using it that were tested |
| --- | --- | --- |
| drb | not yet | no: DRbObject.new_with_uri("druby://host:port").method(args) |
| net/http | partly | yes: Net::HTTP.get(URI(url)) yes: Net::HTTP.get_response(URI.parse(url)) yes: Net::HTTP.post(URI(url), body, headers) and post_form no: Net::HTTP.start(host, port) do \|http\| http.get(path) end no: http.request(Net::HTTP::Delete.new(path)) and Net::HTTP::Post.new(uri) |
| open-uri | partly | yes: URI.open(url).read partly: URI(url).open { } and URI.parse(url).read |

## gRPC

0 supported, 2 partly, 0 not yet.

| Name | Status | Ways of using it that were tested |
| --- | --- | --- |
| grpc | partly | yes: class X < Pkg::S::Service with snake_case methods, GRPC::RpcServer#handle(X) no: Pkg::S::Stub.new(addr, creds) then stub.place_order(req) yes: stub.list_orders(req) returns an enumerator no: stub.place_order(req, return_op: true).execute no: GRPC::ClientStub#request_response("/pkg.S/M", req, marshal, unmarshal) |
| gruf | partly | yes: class X < Gruf::Controllers::Base; bind Pkg::S::Service; def place_order no: Gruf::Client.new(service: Pkg::S, options: { hostname: }) then client.call(:PlaceOrder, ...) |

## Databases and data stores

8 supported, 2 partly, 8 not yet.

| Name | Status | Ways of using it that were tested |
| --- | --- | --- |
| activerecord | partly | yes: Order.where(...) on a model with self.table_name yes: Order.create!(attrs) and order.update!(...) yes: model without table_name: Coupon reads table coupons no: ActiveRecord::Base.connection.execute(raw SQL) yes: Order.find_by_sql("SELECT ...") |
| aws-sdk-dynamodb | not yet | no: Aws::DynamoDB::Client#put_item(table_name:) and query |
| aws-sdk-s3 | not yet | no: Aws::S3::Client#put_object(bucket:) and get_object no: Aws::S3::Resource.new.bucket(name).object(key).put(body:) |
| dalli | supported | yes: Dalli::Client.new(servers).set(key, value, ttl) |
| dynamoid | supported | yes: include Dynamoid::Document; table name: :wishes; Wish.where(...).all |
| elasticsearch (elasticsearch-ruby) | not yet | no: Elasticsearch::Client#index(index:) and search(index:) |
| File, FileUtils (core) | supported | yes: File.write(path, data), File.read(path), FileUtils.mkdir_p |
| mongo | not yet | no: client[:ratings].insert_one / find |
| mongoid | supported | yes: include Mongoid::Document; store_in collection: ...; Review.where / create! |
| mysql2 | supported | yes: Mysql2::Client.new(...).query(sql) and prepare(sql).execute |
| pg | supported | yes: PG.connect(...).exec(sql) and exec_params(sql, params) |
| rails (ActiveSupport cache) | not yet | no: Rails.cache.fetch(key, expires_in:) { } and Rails.cache.delete(key) |
| redis (redis-rb) | supported | yes: Redis.new(url:); redis.set / get / lpush |
| redis-client | not yet | no: RedisClient.config(...).new_client.call("SET", key, value) |
| searchkick | not yet | no: class Product < ApplicationRecord; searchkick; end; Product.search(text) |
| sequel | partly | partly: DB[:invoices].where(...).all and DB[:invoices].insert(...) yes: class Invoice < Sequel::Model(:invoices); Invoice.where(...) no: DB.run(raw SQL) |
| several (main project) | not yet | no: main writes tables, queues and topics that services read |
| sqlite3 | supported | yes: SQLite3::Database.new(path).execute(sql) |

## Messaging and events (queues, topics, streams)

5 supported, 7 partly, 9 not yet.

| Name | Status | Ways of using it that were tested |
| --- | --- | --- |
| actioncable | not yet | no: ActionCable.server.broadcast("orders_channel", data) and stream_from "orders_channel" |
| activejob | not yet | no: Job.perform_later(args) and Job.set(wait:).perform_later no: class X < ApplicationJob; queue_as :shipping; def perform |
| activesupport (Notifications) | not yet | no: ActiveSupport::Notifications.instrument("order.placed") and subscribe("order.placed") |
| aws-sdk-sns | supported | yes: Aws::SNS::Client#publish(topic_arn:, message:) |
| aws-sdk-sqs | partly | partly: Aws::SQS::Client#send_message(queue_url:) and receive_message |
| bunny | partly | no: channel.topic("orders").publish(body, routing_key:) yes: channel.default_exchange.publish(body, routing_key: queue) partly: channel.queue("invoice-requests").subscribe { \|d, p, body\| } |
| delayed_job | not yet | no: Delayed::Job.enqueue(job, queue:) and Object.delay.method(args) |
| google-cloud-pubsub | partly | partly: pubsub.topic(name).publish(data) and subscription(name).listen { } |
| karafka | partly | partly: routes.draw { topic :loyalty_events { consumer X } } with X#consume yes: Karafka.producer.produce_async(topic:, payload:) |
| nats-pure | not yet | no: NATS.connect(url); nats.publish(subject, data); nats.subscribe(subject) { } |
| rdkafka | supported | yes: producer.produce(topic: "payments", payload:) and consumer.subscribe("payments-settled") |
| redis (redis-rb) | supported | yes: redis.publish(channel, msg) and redis.subscribe(channel) { \|on\| on.message { } } |
| resque | not yet | no: Resque.enqueue(JobClass, args) with @queue and self.perform |
| ruby-kafka | supported | yes: kafka.deliver_message(value, topic:) and consumer.subscribe + each_message |
| rufus-scheduler | supported | yes: scheduler.every "10m" do ... end and scheduler.cron "0 3 * * *" |
| shoryuken | partly | partly: include Shoryuken::Worker; shoryuken_options queue: ...; Worker.perform_async(body) |
| sidekiq | partly | partly: include Sidekiq::Job (the name since 6.3) with perform partly: include Sidekiq::Worker with perform no: Job.perform_async(args) and perform_in(seconds, args) no: Job.set(queue: "critical").perform_async(args) no: Sidekiq::Client.push("class" => "Job", "queue" => ...) |
| sneakers | partly | partly: include Sneakers::Worker; from_queue "q"; def work(msg) |
| sucker_punch | not yet | no: include SuckerPunch::Job; Job.perform_async(args) |
| waterdrop | not yet | no: WaterDrop::Producer.new { }.produce_sync(topic:, payload:) |
| wisper | not yet | no: include Wisper::Publisher; broadcast(:order_placed, ...); flow.subscribe(listener) / on(:event) |

## Build tools and package managers

6 supported, 1 partly, 0 not yet.

| Name | Status | Ways of using it that were tested |
| --- | --- | --- |
| bundler | supported | yes: Gemfile plus config.ru Sinatra app, lib/, spec/, gems installed into vendor/bundle |
| bundler (appraisal) | supported | yes: gemfiles/*.gemfile variants generated by Appraisal beside the real Gemfile |
| bundler (path gems) | supported | yes: gems/* libraries and apps/* that load them through `gem "x", path: "../../gems/x"` |
| none (plain Ruby) | supported | yes: plain scripts: bin/*.rb load lib/*.rb with require_relative; no Gemfile |
| rake | supported | yes: a task project: Rakefile and lib/tasks/*.rake, no Gemfile |
| rubygems (gemspec executables) | partly | partly: a command-line gem: exe/shopctl named in spec.executables, Thor CLI in lib/ |
| rubygems (gemspec) + bundler | supported | yes: a library gem: .gemspec, Gemfile with `gemspec`, lib/<name>/, spec/, sig/ RBS, pkg/ and doc/ output |

## Project and folder layouts

8 supported, 0 partly, 0 not yet.

| Name | Status | Ways of using it that were tested |
| --- | --- | --- |
| bundler (several apps) | supported | yes: services/orders (Rack), services/billing (Rails) and libs/shop_events (gem), each with its own Gemfile |
| hanami 2 | supported | yes: a Hanami 2 app with slices/admin and slices/main beside app/ |
| packwerk / packs-rails | supported | yes: one Rails app split into packs/<name>/ (package.yml, app/), all deployed together |
| rails | supported | yes: a Rails app: bin/rails, app/, lib/, test/ (Minitest), db/schema.rb (generated), public/assets (compiled), tmp/, log/ |
| rails engines | supported | yes: a host Rails app with engines/billing (an isolated engine gem with its own test/dummy app) |
| RSpec, Minitest, Cucumber | supported | yes: a library with spec/ (RSpec), test/ (Minitest) and features/ (Cucumber step definitions and support) |
| sorbet + tapioca | supported | yes: typed code with generated sorbet/rbi/gems and sorbet/rbi/dsl, and RBS signatures in sig/ |
| zeitwerk (no Rails) | supported | yes: a Rack app whose lib/ is autoloaded by Zeitwerk: constants are used with no require |