Ruby on Rails
Devise
| Ruby on Rails | Devise | |
|---|---|---|
| 554 | 104 | |
| 57,994 | 24,305 | |
| 0.3% | 0.1% | |
| 10.0 | 7.3 | |
| 4 days ago | 28 days ago | |
| Ruby | Ruby | |
| MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Ruby on Rails
- Django 6 Released
Django needs a marketing push. I opened the website and immediately it smells like a 2011 web framework. Like CakePHP. Like Zend. Like Kohana.
The site makes the project feel extremely dated, which of course I have no idea how true that is, I've never used Django! Just my 2c from an outsider.
I compare it to Phoenix and Rails. (again, talking PURELY marketing here dudes!)
https://www.phoenixframework.org/
https://rubyonrails.org/
- Bazzite: The next generation of Linux gaming
- Rails 7.1 Framework Defaults 🚧
Previous value: nil New value: false Purpose: To understand the impact of enabling this particular flag I had to go through some PRs on rails official repo and came across the following PR. The description of which provides an important hint towards a bug that exists with the deprecated behavior of comparing AC::Parameters with a Hash
- Friendly Attributes Pattern in Ruby
- Rails 8.1 Released
- Ruby on Rails 8.1 Released
- When AI Moved Into My Editor: Faster… and Weirdly Slower
From there, I went into a long phase of copy & paste: throw code at an LLM, ask it to analyze or rewrite, and stitch the result back in. It kind of worked. When reasoning models arrived, my confidence went up: wait a minute, wait three—freshly baked code appears. In Rails, that meant small adjustments and I was done. In Marten, I had to correct more, which made sense — newer framework, less model knowledge.
- Use singular nouns for database table names
> they often automatically pluralize, with the predictable result of seeing tables with names like addresss.
This is a very poor example, that case is literally in their unit tests file:
https://github.com/rails/rails/blob/b0c813bc7b61c71dd21ee3a6...
- Rails 8.1 Beta
Full list of changes:
https://github.com/rails/rails/releases/tag/v8.1.0.beta1
- How to Choose the Right Tech Stack for Your SaaS MVP
Ruby on Rails (developer-friendly, great for startups)
Devise
- What I learned while building ActiveRubyist
ActiveRubyist is now a Progressive Web App (PWA) with Hotwire-based interactivity. For authentication, I use devise, and for real-time notifications, noticed. Where possible, I lean into default Rails features: for background jobs, I use Solid Queue instead of Sidekiq, keeping everything aligned with the Rails way.
- Ruby on Rails Flash notifications with Hotwire and ViewComponents
Assume we use devise for authentication. We need to subscribe user for personal notifications channel. Add this line to app/views/layouts/application/_flash_container.html.erb
- We Fell Out of Love with Next.js and Back in Love with Ruby on Rails
To add, the above code is a pretty near approximation of the literal code inside the devise codebase, which is a very standard Ruby auth system.
See here:
https://github.com/heartcombo/devise/blob/main/lib/devise/co...
def self.define_helpers(mapping) #:nodoc: - Unlocking the potential of Lockable
In October 2024, I presented at the Toronto Ruby Meetup on discovering the potential of using Lockable. Devise is a popular authentication library that provides ready-made solutions for user authentication. One of the features it offers is Lockable, which is used to lock a user account after a certain number of failed login attempts. This feature helps improve security by preventing brute force attacks.
- Rails for Everything
Acknowledging that I haven't had a chance to try the new Rails 8 auth stack... over the last decade I've gone from being a Devise hater to a Devise lover.
Yes, it can seem esoteric and magical (in the bad way) until you wrap your head around the idioms and design philosophy. There's a lot of functionality that happens unless you override it. I fully get that this rubs a lot of people who aren't in the pool the wrong way.
However, in addition to the impressive selection of modular capabilities mentioned elsewhere in this thread, there's a very bright light that goes on when you realize that you can make powerful changes to the way the library works by reopening a few controller classes and defining your own methods.
My strong advice for anyone looking at Devise and perhaps feeling stumped is to open up https://github.com/heartcombo/devise/tree/main/app/controlle... and spend some tens of minutes looking at how the library does what it does. These controller - especially sessions and registrations - contain all of the business logic driving the "magic". Not only do they reveal themselves as relatively simple and well thought out, all of those yield calls mean that you can call those methods while passing a block to them. Whatever is in that block will be evaluated inside of that method when it runs.
The people who designed Devise put a lot of thought into this stuff. When you get it, you suddenly don't want to be without it.
- Efficient Chunked File Downloads in Rails: Streaming CSV Exports
However, using ActionController::Live can sometimes lead to unexpected issues, particularly with authentication libraries like Devise. Devise may raise errors when ActionController::Live is active, especially related to the session or Warden errors, as discussed in this GitHub issue. This happens because ActionController::Live opens a separate thread for streaming, which can cause conflicts with Devise’s thread safety and session handling.
- SpendWise - Budget management app (Ruby on Rails + React) - Part 3
If you like to know how to implement Devise for user authentication, here's the link- Devise
- Rails and Keycloak, Authentication Authorization, part one
Use devise gem, which is probably the most famous rails authentication system.
- Should I Use jwts For Authentication Tokens?
IMHO the stateful opaque token approach is simple enough that it can (and often does) get baked into whatever language/framework you’re using to write your app. In addition, the very nature of session tokens is such that the logic for what the token actually means/represents lives in your app, on the server.
So, that may be why we don’t see more “opaque session token” standards/libraries out there as an alternative to JWTs.
But if you want an existing example, Devise for Rails [1] has been around a while.
[1] https://github.com/heartcombo/devise
- On the road to ramen profitability 🍜 💸
Users can signup and login via the Devise gem and create their organizations.
What are some alternatives?
Cuba - Rum based microframework for web development.
Rodauth - Ruby's Most Advanced Authentication Framework
Roda - Routing Tree Web Toolkit
Sorcery - Magical Authentication
Sinatra - Classy web-development dressed in a DSL (official / canonical repo)
Authlogic - A simple ruby authentication solution.