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.
Zero downtime rebranding with Rails and Heroku
Learn how to migrate your Heroku-hosted application from one domain name to another. See how to rewire an existing Rails project (tests included!) and make it work with multiple domains on a single Heroku instance. SSL caveats are covered too.
kramdown 1.16.0 - Server-side KaTeX, bug fixes and more
Just released the newest version of kramdown, with support for server-side KaTeX, GFM task lists and more - see https://kramdown.gettalong.org/news.html - Thanks to all contributers and supporters!
Meerstats: Reduce the impact of silent production errors
I’m launching the beta of a side project I’ve had brewing for a while – Meerstats. It monitors key metrics and will report anomalies as they are detected. It also sends daily reports, so you can spot check any abnormalities yourself. This is all in an effort to catch silent production errors and reduce the amount of time your customers see them. It’s completely free for the duration of the beta.
7-Part Screencast Series on TDD with RSpec
I just finished creating a free screencast series on practicing test driven development with RSpec. It starts with an intro by using a plain old Ruby class and then covers a few different Rails scenarios. [more inside]
Magics That Rails Decorator/Presenter Gems Do to Make Your Type Less
An analysis of 6 different decorator/presenter gems, what magic have the gem authors done in order to make your type less.
Rails on Docker: Using Yarn to Manage Frontend Assets
A quick tutorial on how to use Yarn to manage frontend assets for your Dockerised Rails app. https://www.chrisblunt.com/rails-on-docker-using-yarn-to-manage-frontend-assets/
FIFO queues with resque
Need something like apache kafka but only want a pure ruby solution and reuses your resque workers? The resque-fifo-queue gem aims to do something like that. [more inside]
Very useful gem for development - any_login
Hello Ruby-developers, I want to share an updated version of any_login gem which is VERY useful for development. https://github.com/igorkasyanchuk/any_login Thanks to @daichirata, @eliotsykes, @zorab47, @linshaodongsam for support.
Traps on Rails - Overriding Boolean Methods in Models
One very useful feature of ActiveRecord is automatically defining attribute readers and writers for all the columns for given tables. For the ones with boolean type, however, there is one more addition – defining an alias of the method with a question mark. Sometimes it might be useful to override this method and add some extra requirements for a given condition. However, this might not be such a good idea. [more inside]
New Jekyll Remote Theme in Action - Turn Your Manuscripts into Live Books w/ Jekyll
Hello, the latest and greatest plugin to GitHub Pages (and Jekyll) is Jekyll Remote Themes. Using a simple config entry you can “automagically” pull in remote themes (layouts, includes, javascripts, etc). To once again show off / test the new functionality I’ve changed the World Classics Bookshelf (Static Website Source) to now use a remote book theme that turns your manuscripts in plain text w/ markdown formatting conventions into live (online) books. See The Trial by Franz Kafka as example. Happy reading. Happy publishing w/ GitHub Pages (and Jekyll). Cheers.
Spot fake accounts on Twitter
Example how to spot fake Twitter account using Ruby and Twitter gem [more inside]
RSpec recipe: remove constants created during a test execution
Learn how to automatically remove classes and modules declared in a RSpec test body. Read a recipe
Amazon API Gateway Can Now Generate Ruby SDKs
You can now generate a Ruby gem for consuming an Amazon API Gateway API with a simple button click or command. [more inside]
Improving Ruby Performance with Rust
Rust is a (compiled) systems language focused on speed and safety. What about integrating it with Ruby? Here’s an introduction. [more inside]
Kafka on Rails: Using Kafka with Ruby on Rails - Part 1 - Kafka basics and its advant
In this series of articles, I will try to provide you with an explanation on why you should invest your time in learning Kafka and the Karafka framework and how it can reshape the way you design and develop your Ruby applications. https://medium.com/@maciejmensfeld/kafka-on-rails-using-kafka-with-ruby-on-rails-part-1-kafka-basics-and-its-advantages-88e80e221ac3
A new extension for application-level mutexes with Sequel ORM and PG is available!
A new extension sequel-pg_advisory_lock for Sequel ORM has been implemented! [more inside]
Partial rendering performance in Rails
Some numbers about rendering times with different techniques. I see often that people are not aware of the importance of rendering views, and especially partials, in the proper way in Rails. In this blog post I show the different approaches with relative numbers. [more inside]
Safely migrating has_and_belongs_to_many associations to Rails 4
Learn about how you can discover changes in Rails defaults by using association reflections and make migrations easier.
Refactor your app away from controller specs
I’m revisiting my series on future-proofing Rails test suites by removing controller specs. This time, I turn my attention to the controllers themselves, and look at ways to make your app’s logic more testable through refactoring. Enjoy!