Rails Icon


Ruby on Rails (Rails) is a web application framework written in Ruby.
105 Stories
All Topics

Miguel Michelson Martinez github.com

Stories — a self hosted Medium platform built with Ruby on Rails

Looks-wise, this is an exact design clone too. Hope that doesn’t get anyone who uses this “as is” in any trouble with the real Medium.

This project is a fork of a Medium clone which began as Ken Hibino’s personal side project to learn Rails and React. I upgraded and refactored parts of the Rails app and integrated Dante2 wysiwyg editor.

If you’re looking for commentary around the project or Rails, check Hacker News.

Rails medium.com

Powering your Ruby & Rails development with Pry

I use Pry (a runtime developer console) all the time and I still learned a few tricks from this post. Here’s a doozy for working in Rails apps:

there’s show-routes , which does what the name implies, and also takes a -G flag for grepping. No more starting up a new shell to execute rake routes | grep login and wait for it to boot up Rails just to give us the routes on the side!

This is the one and only tool that i miss when working with Elixir and Phoenix. Yes, I know there’s IEX.pry built in, but it doesn’t offer as smooth a workflow as Ruby’s pry. Maybe someday…

Rails 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. 🤣…😭

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

Elixir infinum.co

Things I wish ActiveRecord had after using Ecto

Great list, and I agree with many of Vladimir’s points. However, I have to admit that Ecto’s take on preloading still bugs me after years of use.

I find myself doing the preload dance all over the place even when I’m well aware of the performance issues around N+1 queries. I thought I’d get used to it over time, but it still irks me every time I see an Ecto.Association.NotLoaded exception.

Rails changelog.com/posts

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.

Rails changelog.com/posts

Rails 4.1 to get a Spring in its step

A lot of focus lately has been put on improving Rails’ speed in dev mode. John Leighton’s Spring gem is a result of some of that focus. It preloads your Rails application and keeps it running in the background so you don’t need to boot it every time you run a test, rake task, or migration.

As of this commit Spring will be installed by default on newly generated Rails 4.1 apps.

Rails changelog.com/posts

View Rails debug messages in the browser console with Rconsole

Using log messages in Rails can be a huge timesaver when you are debugging. With Rconsole you can save even more time by having those messages appear in the browser console. Rconsole is a fairly new gem with a lot of potential.

Installation is super simple. First add it to your Gemfile:

group :development do
  gem 'rconsole', '~> 0.1.0'

Then run bundle install. Add to your layout view:

javascript_include_tag(:rconsole) if Rails.env.development?

To use Rconsole simply add rconsole.log messages where you would normally insert logger.debug, etc.

def show
  rconsole.log 'Hello, Changeloggers!'

Now your browser will display your messages:

Rconsole output

In addition to debugging, Rconsole is particularly useful when working with students or new rubyists to show the connection between what's happening in the controller and the view.

The entire code base is open source and available on GitHub.

0:00 / 0:00