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.
CanCanCan 2.0 is out!
After few months CanCanCan has finally a new major version: 2.0. There are many important changes in the new version but very few new features. We thought it was time to bring the project back on track and drop support for a lot of unnecessary features. [more inside]
Podcast: Michael Feathers on Avoiding Legacy Code
What makes a code base go bad and become “Legacy Code”? Can teams avoid writing bad code? Michael Feathers, author of Working Effectively With Legacy Code joins Tech Done Right to talk about technical debt, how communication can prevent bad coding practices, why coding problems are never just about code, and what it’s like to go around the world seeing the worst code messes ever written. [more inside]
Fighting the Hydra of N+1 queries
A huge insight into the problem of N+1 queries with Rails: starting from the junior-level stuff (what is it and how to fight it) moving to the usage of bullet gem, hardcore problems caused by the complexity of the application and DRY/OO patterns used — and ramblings on how to tackle the problem at its root. [more inside]
Building tools and building teams
I finished up my series about building tools to remove distractions with https://www.saturnflyer.com/blog/2017/3/21/building-tools-and-building-teams (with links to the previous 4 articles at the top if you missed them)
Testing Rails API with ActiveModelSerializers using RSpec
Thanks to this installment you can learn how you should test your API and how to write clean and readable tests using RSpec. https://www.nopio.com/blog/rails-api-tests-rspec/
Setup your Ruby on Rails Server with Ansible
Go from development to production for your Rails app with Ansible. Come and watch how you can get your Rails app into production on your own server in about half an hour. https://chrisherring.co/posts/setup-your-ruby-on-rails-server-with-ansible
Template Rendering in Rails
Hi, I just made a slide to introduce how Rails renders our view templates and want to share with you. If there’s any problem or feedback please just email me :-) [more inside]
[Screencast] Routing Partials
The routes file can grow to be unmaintainable and messy. Learn to keep things organized by extracting out blocks of routes into their own files. https://www.driftingruby.com/episodes/routing-partials
Do analytical research using Ruby
The example of how you can use twitter-gem made by Erik. How to use Twitter Search API and what you can do with it? [more inside]
Testing a Feature with Rails and RSpec: A deep dive
One of the things I hear most from developers who are new to Ruby and Rails, or just to testing is, How do you get started? What should I test? The value of testing your code and the confidence it brings is already apparent, but how to make it happen seems to be missing. In this post I address how I approach testing a fairly simple, but non trivial feature from start to finish. https://chrisherring.co/posts/testing-a-feature-with-rails-and-rspec-a-deep-dive
Ruby/Rails Interview Questions
Pre-compiled list of questions with regard to Ruby and Rails for interview candidates. Contribution is more than welcome. https://github.com/dyjakan/ruby-rails-interview-questions
Density Map in three ways
Detailed article explaining different solutions to the same problem, each with different time complexity. From O(n^4) to O(n^2).
One more article about ruby best practice
Everyone engineer should read tech literature in free time. When you are reading you learn a lot of new things. You read about someone’s experience, best practice and fails. With that useful information you can see new opportunity, can make your code better and more stable, can create new features better and faster. In this article I want to share some good practice that I have read in tech literature. [more inside]
How to find and fix bug in JRuby and don't go crazy
The story about fixing bug in JRuby. http://etehtsea.me/how-to-find-and-fix-bug-in-jruby-and-dont-go-crazy
Don't Use Objects as Hash Keys in Ruby*
An observation in performance over different kinds of keys used for Ruby’s Hash. Read On
A better "bundle update"
If bundle update for your Rails projects is a risky a frustrating process, try bundleup instead! I wrote bundleup to use the same Bundler commands behind the scenes, but added some nice enhancements. My favorite feature is how it color-codes the gems that will be upgraded according to semver, so you can immediately spot the minor (yellow) and major (red) version changes that might cause your app to break. Install it with gem install bundleup and check out the documentation on GitHub!
A Ruby interface to the Lionshare API
API that providing historical cryptocurrency market data. https://github.com/kirillshevch/lionshare
APIQ - new name for KMS
Due to different name collisions, I’ve decided to choose new name for KMS. Since today, it is ApiqCMS, or just APIQ :-) [more inside]
Ruby: How a Language Reflects its People
https://pusher.com/sessions/meetup/sheffield-ruby-user-group/ruby-how-a-language-reflects-its-people What are the values that entered into the language by way of its core committers and what are the values we identify with as a community? How can making these values explicit help us foster a better community? What might Ruby be like if its community were primarily French, German, Italian rather than English-speaking and Japanese?
How to Build a Ruby SlackBot
A simple to follow tutorial on how to easily build SlackBots with Ruby! https://revs.runtime-revolution.com/how-to-build-a-ruby-slackbot-bc7115b4eeaf
Start using GraphQL in Rails
A step by step tutorial on getting GraphQL set up in your Rails application. http://drianhillman.me/2017/05/06/graphql-ruby
57 Best Ruby Gems We Use at RubyGarage
Ruby gems are libraries that offer a variety of pre-made solutions for developers that save time and money. We’ve highlighted a few essential gems that a full-fledged Ruby developer can’t live without.