The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Build an API in your Rails app now! (Rails 5 version)
An extensive tutorial (with fully working/deployed code!) on how to build a modern API on Rails. [more inside]
Class attributes in Ruby and ActiveSupport
Even such simple thing as class-level attributes may get tricky. Read about how does it work and how it’s implemented in Rails and learn some cool tricks.
Going further with Service Objects in Ruby on Rails
As a follow-up to the recent post about Service Objects, “Service Objects in Ruby on Rails…and you”, I wanted to go deeper into Service Objects subject with details such as keeping objects to a single responsibility, better error handling, and clearer usage. https://hackernoon.com/going-further-with-service-objects-in-ruby-on-rails-b8aac13a7271
When to require irb in Ruby 2.4.0
One of the things you’ll notice if you search for tutorials on Ruby 2.4’s Binding.irb is that some examples need a require 'irb' and some don’t. In this article When to include irb in Ruby 2.4 I explain why.
Add an admin dashboard to a Rails 5 API app using Administrate
Continuing the series on configuring popular admin dashboard frameworks for a Rails 5 API application (previous: Active Admin, Rails Admin). This post focuses on thoughtbot’s Administrate. http://www.carlosramireziii.com/using-administrate-with-a-rails-5-api-application.html
Planet Jekyll's Showcase Feb'17 Update - Babel, HTML Reference, Vienna.html, Scorsese
Hello, I’ve added 10 new static websites to the Planet Jekyll’s Showcase that highlights the latest (and greatest) sites built with the Jekyll machinery. [more inside]
Faster CI builds using an in-memory database
What if you could get some speed improvement for your database intensive tests for free? In my test, I got 32% speed improvement by using in-memory database with tmpfs file storage. Give it a try yourself and see what you get out of it.
Rails::API vs. Sinatra vs. Grape: which microframework is right for you?
Rails dominates Ruby web frameworks: the next most popular framework, Sinatra, has 5% of the popularity of Rails. However, that doesn’t mean non-Rails frameworks like Sinatra and Grape don’t have their place. I explore the sweet spots and gray areas for Rails::API, Sinatra, and Grape.
5 Steps To a Fast Reliable Test Suite
Sign up at https://www.rubytapas.com/testingjournal/ for a free email course on testing from Noel Rappin and Avdi Grimm to learn:
[Screencast] Working with Internationalization
Adding translations into your website does not have to be hard. With Rails built in I18N functionality, we gain access to many helpers and conventions that makes it a much easier task. Learn how to add I18N into your Rails application. https://www.driftingruby.com/episodes/working-with-internationalization
5 habits that made me a better Ruby developer
Over the last two years as a freelance developer I’ve picked up a couple of habits that improved the quality of my work and that I’d like to share: https://christoph.luppri.ch/articles/2017/02/20/5-habits-that-made-me-a-better-ruby-developer/
Faster RSpec: Profiling FactoryGirl
One way to speed up a slow test suite is to optimize how FactoryGirl is used, but where do you focus your efforts? Before tuning your factory usage, use FactoryGirlProfiler to measure which factories are adding the most time to your test runs: https://www.wetestrails.com/blog/profiling-factorygirl
Release acts_as_hashids 0.1.4
If you want to use Youtube-Like IDs seamlessly in your Rails Apps, please give it a try! https://github.com/dtaniwaki/acts_as_hashids
Necromancer with new syntax
Necromancer adds new syntax for data transformations such as coercion into range
Necromancer.convert('1-10') >> Range, or casting to boolean type Necromancer.convert('yes') >> :boolean. Enjoy!
Coders-log.com released! Rubyflow & JSLive clone for all development technologies.
I have released the website https://coders-log.com This is a website similar to RubyFlow and JSLive but instead supporting all of the other technologies such as Go, Crystal, Elixir, Java, Unix, SQL, CSS, Design, and many more. Check it out! https://coders-log.com
Replacing the asset pipeline with Webpack 2 in Rails
I have just finished writing an article on how to replace the asset pipeline with Webpack 2 in Rails
Ruby code I no longer write
Learn what kind of Ruby code I started to avoid after a few years of working with it and maintaining large, legacy applications.
Start Using Yarn With Rails Today
Rails 5.1 will support Yarn out of the box, but in the meanwhile, if you want to start using yarn to manage your JS dependencies, here’s a short post showing how you can add Bootstrap to your Rails app using Yarn.
Using Bootstrap 4 with Ruby On Rails
A quick walkthrough on how to add Bootstrap 4 to an existing Ruby on Rails application. We use the bootstrap gem to manage the files and updates, and update the stylesheet and JavaScript manifestos.
Spreadsheet Architect v2.0.1 released!
New version released of Spreadsheet Architect gem. Spreadsheet Architect is the simplest way to generate xlsx, ods, and csv spreadsheetsfrom your application. https://github.com/westonganger/spreadsheet_architect
Core Ruby Tools
A short exploration of several core tools (Rubygems, Rbenv/RVM, Bundler, Rake) that should be in every Ruby developer’s toolkit, with an emphasis on how the components fit together on your system. Includes troubleshooting tips.
Upgrade Ruby, find a bug
Some notes on finding a bug as a result of a Ruby upgrade. OpenSSL, Ruby 2.4.0, dotenv, all that.