Ruby Icon

Ruby

Ruby is a scripting language designed for simplified object-oriented programming.
270 Stories
All Topics

Mauricio Gomes github.com

Stealth – a Ruby framework for creating conversational bots

This is a lot like Ruby on Rails (even with ActiveSupport & ActiveRecord built-in), but instead of views you have replies. It works for both voice-based and text-based bots and has NLP offerings baked in too. 🍰 The only bummer is that service integrations are currently limited to Facebook Messenger and Twilio SMS. That's pretty normal for a new open source offering, though, and it's a great place to hop in and contribute. ✊

read more...

Tom Black www.blacktm.com

A guide to getting started with Ruby on WebAssembly

Tom Black: With the advent of WebAssembly, the race is on to bring new languages to the web. This is the first example (I think!) of a Ruby interpreter running in the browser. The path to get there is circuitous. Ruby script → MRuby bytecode → C → emcc → LLVM → Binaryen → WebAssembly The good news is access to that path is just a gem install wasm away. Read the entire post for some great context and history around these efforts.

read more...

Rails Icon rollbar.com

Top 10 errors from 1000+ Ruby on Rails projects (and how to avoid them)

Nice post by our friends at Rollbar: We looked at our database of thousands of projects and found the top 10 errors in Ruby on Rails projects. We’re going to show you what causes them and how to prevent them from happening. If you avoid these "gotchas," it'll make you a better developer. I know many of these like the back of my hand. 🤣...😭

read more...

Chris Frank github.com

Dynamically filter and sort data via URL params in any Rack app

If your Ruby/Rack app renders a list of database records, and you want those records to be filterable via URL params, Rack::Reducer can help. I like that this is Rack-focused, since Rails already has plenty of solutions in this space. The README includes examples of use with Sinatra, Hanami, Roda, and other commonly used Ruby web libraries.

read more...

Ruby Icon github.com

A lightning fast JSON:API serializer for Ruby objects

The Netflix team managed to squeeze out some huge performance improvements over Active Model Serializers: We want to ensure that with every change on this library, serialization time is at least 25 times faster than Active Model Serializers on up to current benchmark of 1000 records. At first glance I thought this was a drop-in replacement for AMS, which would've been epic, but it has its own API. That being said, its API is pretty similar and looks easy to use. Exactly how much faster is this library? It can serialize 250 records in 3.01 ms vs AMS's 138.71 ms!

read more...

Linux Icon jvns.ca

How do you spy on a program running in a container?

Julia Evans: Yesterday I added Linux container support to rbspy, so that an instance of rbspy running on the host machine can profile Ruby programs running in containers... I thought it would be fun to explain what adding “container support” involves in practice! (rbspy is her sampling profiler for Ruby.) This bit is interesting, and why this post isn't tagged with the Docker topic: We didn’t need to care about Docker or anything like that – it’s irrelevant what container runtime our containers are using, and we certainly don’t interact with Docker at all. I guess a few simple syscalls is all it takes!

read more...

Ruby Icon changelog.com

Einhorn: the language-independent shared socket manager

Cool Ruby gem from the team at Stripe which makes it easy to run multiple copies of a single long-lived process. From their announcement post: Einhorn makes it easy to have multiple instances of an application server listen on the same port. You can also seamlessly restart your workers without dropping any requests. Einhorn requires minimal application-level support, making it easy to use with an existing project. I'm going to take a seriously look at Einhorn before deploying my next app. (also this)

read more...

Ruby Icon changelog.com

Praxis: a Ruby framework that takes a different approach to creating APIs

RightScale recently unveiled their new Ruby framework. They call it Praxis and it takes a unique approach to building APIs. From the announcement: With Praxis you create an API by going through the design, review and implementation phases and iterating over them as necessary. Each phase is done independently, and possibly by disjoint sets of people. For example architects could design it, developers implement it and both can review it alongside the customers. Intrigued? Check out their Getting Started guide to see what this process would look like.

read more...

Rails Icon changelog.com

CanCanCan picks up where CanCan left off

Ryan Bates' unfortunate burnout-induced hiatus from open source left his projects unmaintaned. CanCan — the much beloved authorization gem for Ruby on Rails — was no exception. CanCan may be dead, but long live CanCanCan! This repo is a continuation of the dead CanCan project. Our mission is to keep CanCan alive and moving forward, with maintenance fixes and new features. Pull Requests are welcome! This is what I love about open source. Great ideas aren't bound to their creators. All it takes is one person who cares enough to pick up the torch and run with it.

read more...
0:00 / 0:00