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.
sermepa_web_tpv gem updated to new hmac 256 signature
I’ve just released a new update of the Spanish payment gateway sermepa_web_tpv. It implements the new signature system based on hmac 256
Rack::TestApp, intuitive testing helper for Rack
Rack::TestApp 1.0.0 released. It is intuitive helper library to test Rack application. See README for details.
Method transplanting in Ruby
Method transplanting is an elegant solution to keeping classes clean. This solution will work perfectly when a transplanted method has no dependencies on other methods from the original module considering unbound/bound do not track them. [more inside]
Architecting Rails Apps as Microservices
Monolith or Microservices? Designing your Rails app to work well with Microservices involves providing clear interfaces across the different boundaries of functionality in your app. Once the boundaries have been defined, how do you communicate across them? HTTP, queues? What if a service is down? These are some of the topics I cover in this article.
The Class That Never Ends: A Ruby Horror Story
Here is a controller file from the Ruby Central CFP app. You may observe that the class definition ended too early due to a honest rebase mistake. However, everything is still working correctly, and tests are passing. Can you tell why?
Implement Futures in Ruby
Benjamin Tan Wei Hao wrote an article on how to implement futures in Ruby. It’s really good and teaches a bit about concurrency, etc.
Separate model logic from view
In this post i describe why i think it’s good to separate model logic from view. https://masa331.github.io/2015/11/16/hide-complexnes-from-view.html
Quantum Computing with Ruby
Using a special interlacing hash, we can do some experiments with quantum superposition and of course the famous cat from Mr. Schrödinger. [more inside]
The Lazy Developer's Guide to Life Without the Mouse, Cursor and Useless Keys
Dare I broach the topic of the Vim vs Emacs holy war? I’ve tried both editors, but ultimately Vim stole my heart and, in doing so, turned my life into hell. It’s such a pleasure to use; nothing else compares to it. Suddenly, I hate typing with any application that doesn’t use the HJKL keys to move the cursor, and I find myself becoming frustrated whenever I need to use the mouse! So what changes can I implement to ease my pain and make my life easier, you ask? https://netguru.co/blog/guide-lazy-developers
Setting a default image when using Cloudinary and CarrierWave in Rails
Cloudinary lets you specify a default_image parameter when using the cl_image_tag, along with all of your transformations, to provide a fallback image if one has not been uploaded. If, however, you are using CarrierWave, you’ll likely want to define your transformations and the fallback image just once in your Uploader class, but this is not well documented - here’s how to do it. [more inside]
Brakeman Pro 1.0 Now Available
Brakeman Pro, the commercial version of the open source Brakeman static analysis security tool for Ruby on Rails, has just been released. It provides a streamlined desktop GUI interface to manage scans and investigate warnings as well as a drop-in command-line replacement for Brakeman.
Representable 2.4: How Functional Programming Speeds Up Rendering And Parsing.
Representable is a gem to render and parse documents, e.g. for REST APIs. In the 2.4 release blog post you learn how we used functional programming pipelines to simplify the code and improve performance by factor 3.
rails_db - major release, please check notes
https://github.com/igorkasyanchuk/rails_db - please check an updated version of my gem (version 0.8) [more inside]
Send emails with Mandrill and Rails
Mandrill by MailChimp is an online service that sends transactional emails. We have used it to send emails in our Ruby on Rails apps for some time now, and we’ll show how to do that here.
Hacking Your Gems for Debugging
Ever wish you could drop a few puts or binding.pry calls in to a gem so you could understand what’s going on inside? In this post I share some useful tooling for altering your local gems for the purposes of debugging. Read More: Hacking Your Gems for Debugging
Spying on running Ruby processes
Did you know that it’s possible to log all method calls as they occur in a running process in real time? How about injecting code to be executed inside of a running process? You can - via the magic of the rbtrace gem. http://blog.honeybadger.io/spying-on-running-ruby-processes/
Ruby Static Site News - Jekyll v3.0.1 Released, Meet Hyde, Nanoc v4.0 'n' More
Hello, Via @Vienna.html some static site news bytes (follow along for more ;-). New Releases: [more inside]
Is your app deRailing?
An introductory article on Trailblazer, its benefits, how it can help to better organize bigger apps, with some code samples and everything. Read more
Lexical scoping and Ruby class variables
In this post we’ll discuss some non-obvious behavior of class variables and show how it’s all the fault of lexical scoping. http://blog.honeybadger.io/lexical-scoping-and-ruby-class-variables/
Free SSL with CloudFlare and Heroku
It’s easy to https your Heroku site without actually buying a SSL certificate. Just use Cloudflare’s Universal SSL and you are done! Follow the steps in this blog post.
Effective TDD With Ruby: Tmux Setup
Last article of this series where you’ll learn how to build an UNIX IDE for highly productive coding sessions. Read more
Peeking Under The Hood of ActionController Parameters, Part 1
Strong parameters are a daily staple in any Rubyist or Rails developer’s workflow. But how do they actually work? And why do we use methods like require and permit? What do they do, exactly? This blog post tries to answer these questions by taking a peek under the hood.
Five Active Record Features You Should Be Using
Active Record is responsible for communicating with the persistence layer by default in Ruby on Rails applications. Using Active Record effectively and efficiently can greatly improve an application’s code.
Adding tags to ActiveRecord models
Where we see how to add tags to the Article models of a blog application written in Ruby on Rails. The user should be able to enter a list of words separated by comma; the app should then create tags from the words entered if they don’t exist, and link them to the article.
Scrivito: A professional Cloud CMS built for Ruby on Rails
Most Rails developers are struggling to find a Rails-based CMS with the feature set of PHP options like WordPress or Drupal. That’s why we’ve built Scrivito. Our SDK, delivered as a Gem, integrates with any Rails app within 10 minutes. So you can easily enhance your existing Rails app with WYSIWYG content editing capabilities and much more. Try a free 30-day free trial on https://scrivito.com.