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.
Pakyow v0.11 Release Announcement
Pakyow v0.11 is available now on RubyGems. Read the release announcement or watch the release walkthrough. Happy Friday!
The Top 5 Most Popular Jekyll Gem Plugins
Hello, I’ve put together a list of the top five most popular jekyll gem plugins. And the winner is… [more inside]
Why Switch From Single- To Multi-Branch Flow? Read Our Story
After a couple of years in single-branch flow, my company decided to switch to pull request flow. Why? What does it change? What tools do we use? It’s all explained in the blog post by our CTO. Why We Switched From Single Branch Flow To Pull Requests
Let’s Encrypt + Route53 + Ruby = Yay!
A few months ago, Let’s Encrypt rolled out a feature to verify domains over DNS. Their automatic configuration tool doesn’t support all the use cases yet, including my particular scenario: multiple load-balanced EC2 instances behind a single ELB, using Route53 for DNS. I wrote a tool to simplify updating Route53 DNS Records with the challenge, as well as updating the ELB with the resulting certificate. Check out the README and code, or read on for why I wrote it.
Better Security for Ruby Apps
Check out security functionality updates in Hakiri.io! Now, Ruby projects can be scanned for vulnerabilities from both NIST NVD and Ruby Advisory Database. There are also multiple updates to vulnerability pages: aggregated security data from several data sources, Markdown support, vulnerability references, and a few more. You can try it out in your open source projects and get a GitHub page security badge like Jekyll, Paperclip, and hundreds of others.
Awesome Jekyll Plugins - New Jekyll Plugin (Community) Directory / Listing Started
Hello, I’ve started on a new Jekyll plugin directory / listing called Awesome Jekyll Plugins. Still early and rough. ++ The idea is to start with the “official” plugins listed in the plugins doc. For now I keep the same “categories” e.g. generator, converter, filter, etc. but I’ve started to split the plugins in gems, scripts and pasties and to get a sense of how popular (and possibly useful) I’ve started to add github stars (e.g. ★24). ++ Anyways, if anyone wants to help out or if you know any other Jekyll plugin listings / directories, let us know. Questions and comments welcome. Cheers.
Docker: Port and Volume Mapping
In this Video we discuss port and volume mapping in docker.
Grub - Add comments to your Gemfile with each dependency's description
Check out this simple tool to clarify your Gemfile contents by adding a comment for each gem that describes what it does. Try it out live at https://grub-gemfile.herokuapp.com/ or install the tool yourself https://github.com/ivantsepp/grub . Let me know what you think and file any issues/ideas you have at GitHub
Rails plugin to send Newsletters via Amazon SES
I just published a Rails plugin that allows you to easily build and send Newsletters via Amazon SES (which is very affordable). The name of the gem is aws_ses_newsletters. It uses Sidekiq (because you will usually run the process asynchronously) and Premailer to inline the css. You can find the code here: https://github.com/10Pines/aws_ses_newsletters The readme has detailed instructions to install it and use it. There is also a demo project at: https://github.com/10Pines/aws_ses_newsletters_demo Any feedback will be appreciated!
How to Diagnose Ruby on Rails N + 1 Query Problems
Diagnosing performance problems in a production Ruby on Rails application can be deceptively complex. Development environments that are not subject to typical production web traffic may not make performance issues evident. In those instances, the use of some simple (and mostly free) tools can help diagnose performance issues in production.
Changes to test controllers in Rails 5
In Rails 5, controller tests have undergone some major changes. [more inside]
How to Reply to an SMS with Rails and Twilio
Video tutorial and quick blog post on how to reply to text messages with Twilio and Rails.
When to avoid the DRY principle
The DRY principle is great, and often leads to a higher quality of code but, as Luke Morton explains using RSpec examples, it’s possible to take it too far. https://www.madetech.com/blog/when-to-avoid-the-dry-principle
dokku VM setup with hints on how to use Rails on top
I described a workflow to use dokku in Ubuntu VMs and some basic hints on how to host a Rails app on top of this. The app can make full use of postgres, persistent storage (e.g. for file uploads) and two-and-a-half-lines-of-code SSL support (letsencrypt). I find the little tools around that setup real fun to work with. Find the article at http://fwolfst.github.io/docker/dokku/dokku-alt/virtualization/2016/04/18/dokku-on-ubuntu-vm-complete-rails.html . It might still be rough at the edges, feedback more than welcome!
Decoding Ruby on Rails (3+) signed session cookies
A quick article on how to decode the signed session cookies that are used by default in Ruby on Rails 3 (and up). Read more here: http://www.markcampbell.me/2016/04/18/decoding-the-ruby-on-rails-signed-session-cookie.html
Use Ruby’s Refinements Anywhere With An Anonymous Class
After lots of experimentation and searching over a few years I’ve finally found a way to use Ruby’s refinements conveniently and anywhere. You don’t need to define a class method to use the refinement or instantiate an instance of a class that has the using syntax in it. You may use using in an anonymous class if it is opened with the shovel operator « . Read more here: Use Ruby’s Refinements Anywhere With An Anonymous Class
Spina CMS - Update 0.9.0
The nicest Ruby on Rails CMS is getting more and more users and contributors. Thanks you guys! [more inside]
Improving Rails application documentation
Reading and writing more Python and Elixir has me thinking about how to improve the quality of Rails code bases, through better documentation practices. Here are some steps I’m taking to improve my Rails projects’ docs.
Using PaintCode with RubyMotion
Here’s a quick overview of using PaintCode and translating the exported code over to Ruby for your RubyMotion project. => https://youtu.be/Nat4umZDMHA [more inside]
Using Webpack with Middleman
I use the Ruby static web framework, Middleman, to build my site, https://rossta.net. Middleman dropped support for Sprockets in its latest major release so when I went to upgrade recently, I needed to replace my asset pipeline with something else that turned out to be Webpack. I’ll describe the new external_pipeline
feature in Middleman and how I got it to work with Webpack. https://rossta.net/blog/using-webpack-with-middleman.html
New Reality Release
Today we are announcing new release of Reality–comprehensive data proxy to real world. In the release: new shiny documentation, new reality
console command and many other goodies.
Rails 5 has added accessed_fields to find the fields that are used in application
Rails 5 introduces accessed_fields method to determine all the fields that were accessed on a model while performing some operation. [more inside]