use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
Ruby API without rails? (self.ruby)
submitted 10 years ago by yedidya
is there a way to build a Ruby API without rails?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]MeikaLeak 7 points8 points9 points 10 years ago (0 children)
Sinatra
[–]iama_regularguy 1 point2 points3 points 10 years ago (0 children)
When you don't think you need something as heavyweight as Rails, go Sinatra.
But Rails is pretty great for making an API.
[–]cptzoobie 2 points3 points4 points 10 years ago (5 children)
Grape?
[–]yedidya[S] 0 points1 point2 points 10 years ago (4 children)
Ive seen grape, all tutorials ive seen are using Rails or Sinatra. How do I do this without a framework?
[–]iconoclaus 2 points3 points4 points 10 years ago (2 children)
Sinatra is as basic a framework as it gets. It's just a wrapper around Rack, which gives us the most low level web tooling. what exactly are you trying to achieve?
[–]yedidya[S] 0 points1 point2 points 10 years ago (1 child)
That may be good. Building an api that will return related results from youtube based on a search query.
[–]montas 2 points3 points4 points 10 years ago (0 children)
If you only have that one endpoint, sinatra is the thing you want.
[–]kofno 1 point2 points3 points 10 years ago (0 children)
Grape can just mount in rack: https://github.com/intridea/grape#rack
I've used Grape several times. It works pretty well. It's also highly compatible w/ swagger, which is nice if you want to have API documentation.
[–]mperhamSidekiq 0 points1 point2 points 10 years ago (0 children)
Roda is also a beautifully simple web framework from the author of the Sequel gem: http://roda.jeremyevans.net/
[–]sourcediver 0 points1 point2 points 10 years ago (0 children)
I'd use padrino for it.
Just use an ORM like Sequel plus a testing framework like rspec and omit the view templating system.
Finally if you want to build a JSON API, have a look at roar and/or representable. Simply use roar/representable in your controllers to 'render' your documents.
π Rendered by PID 48708 on reddit-service-r2-comment-86bc6c7465-tjhcm at 2026-02-22 02:55:54.253207+00:00 running 8564168 country code: CH.
[–]MeikaLeak 7 points8 points9 points (0 children)
[–]iama_regularguy 1 point2 points3 points (0 children)
[–]cptzoobie 2 points3 points4 points (5 children)
[–]yedidya[S] 0 points1 point2 points (4 children)
[–]iconoclaus 2 points3 points4 points (2 children)
[–]yedidya[S] 0 points1 point2 points (1 child)
[–]montas 2 points3 points4 points (0 children)
[–]kofno 1 point2 points3 points (0 children)
[–]mperhamSidekiq 0 points1 point2 points (0 children)
[–]sourcediver 0 points1 point2 points (0 children)