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.
Scout introduces database monitoring for Rails apps
The database - not Ruby 😮 - is the most common performance bottleneck for Rails apps. Scout adds database monitoring to its app monitoring product to make it easier to identify expensive queries and resource issues.
[Screencast] Speeding Up Tests
Slow tests can slow down your development process. Using parallel_tests, you can speed up your test suite by multiple threads and running the tests in groups. https://www.driftingruby.com/episodes/speeding-up-tests
A pitfall of the &. operator in Ruby
A story about changed behaviour when I refactored to use &. operator. [more inside]
Wannabe Bool gem updated
If string, numeric, symbol and nil values wanna be a boolean value, they can with the new to_b method. For sake of readability (and personal choice), version 0.7.0 adds two aliases methods: [more inside]
🎧 Rails as a Day Job, Diesel on the Side
Sean Griffin joins The Changelog to talk about doing Rails full-time, his love of Rust. and his project Diesel - a safe, extensible ORM and query builder for Rust.
Angular 4 with Rails 5
Angular is a framework for building client applications in HTML and either JavaScript or a language like TypeScript that compiles to JavaScript. [more inside]
Slideshow (S9) Template Gallery - Alternative to PowerPoint n Keynote in Ruby
Hello, I’ve updated the Slideshow (S9) Template Gallery. Write your slides / presentations / talks in plain text with markdown formatting conventions (eg kramdown) and use the ruby slideshow (s9) tool to generate an all-in-one (static) webpage using any of the templates e.g. s6, reveal.js, impress.js, bespoke.js, deck.js, shower, and some more or build / use your very own. Cheers.
Arbolito 0.3.0 released
I’ve released a new version of Arbolito, a gem to fetch currency rates. As Yahoo Finance API is not working, I’ve introduced a new API. Check the README and send your feedback.
Interactors in Ruby — easy as cake, simple as pie
Ever heard of Interactor? It hasn’t heard about you either. That’s because it only has one responsibility in life. Learn what it does, how it works and a couple of no-no’s in this opinionated article: https://goiabada.blog/interactors-in-ruby-easy-as-cake-simple-as-pie-33f66de2eb78
Form Core - A demo that building dynamic form model based on virtual model technique
form_core is a quiet complete demo to show a form application, that can define a complex form (many kinds of data types, nested form, refer to other model in physics), render it with Rails form builder, and support serialize its instance (you can write your own serializer). [more inside]
Understanding why and how to add idempotent requests to your APIs
I explored a bit the idea of how to add a idempotent requests mechanism to an API, and wrote about three possible solutions here. Check it out and drop a comment!
Transactions in Rails and Atomic Bugs
“Transactions in Ruby on Rails can be deceptively tricky to master. The following illustrates a few examples of when using simple transactions can go awry and inadvertently fail to provide atomicity.”
Useful RSpec trick for testing method with arguments
This blog post shows how to test complicated methods with arguments in a concise and idiomatic way. It also provides some philosophical arguments on “one-assertion-per-test” practice and RSpec code styles.
How does Bitcoin force consensus among Byzantine generals?
Matias Fernandez has a very good example implementation of a blockchain exercise written in Ruby. In this post I want to use it to explain, in very simple terms, what a bitcoin blockchain is and why it’s so resilient.
Performance Improvements in Ruby 2.5
New Ruby versions keep improving & Ruby 2.5 is no different. Find out what changed! http://www.rubyguides.com/2017/11/ruby-2-5-performance/
The latest Ruby news: Roobykon Ruby Digest: Issue 16
Web servers! Everyone seems to have an opinion about which are the best and why, but if we’re not careful, habit and loyalty can blind us to rational decision-making. In this issue of Digest, we look in depth at some issues around servers for Ruby – and a whole bunch of other things besides. Enjoy. [more inside]
Memory Conscious Programming in Ruby
A short post about ways and strategies to keep memory usage low - https://gettalong.org/blog/2017/memory-conscious-programming-in-ruby.html
Cleanly Scaling Sidekiq
When your autoscaling group terminates instances running Sidekiq, you should finish the Sidekiq jobs before the instance gets terminated. This is how we do that at Honeybadger: http://blog.honeybadger.io/cleanly-scaling-sidekiq/
Relative Testing vs Absolute Testing
A subtle mind shift that serves as another approach to making your tests resilient and complete. [more inside]
Replacing Mocks With Hand-Written Test Doubles
If you reach for mocks when needing to stub out methods on objects under test, a hand-written test double may be a much better fit. [more inside]