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.
macOS Mojave: Ruby and Rails
Setting up Ruby / Rails can be quite a challenge, in this episode we’ll walk you through the process so you can get up and running with ruby and rails as fast as possible. [more inside]
Rails 5: Matching Asset URLs in Feature Specs
A brief post showing how to match fingerprinted asset URLs in your specs with Rails 5. https://www.chrisblunt.com/rails-5-matching-asset-urls-in-feature-specs/
Why the CSV standard library is broken (Part IV) - Numerics aka Magic Type Inference
Hello, I’ve written a new (and fourth) episode on why the CSV standard library is broken, broken, broken (and how to fix it). Let’s have a look at numerics a.k.a. auto-magic type inference for strings and numbers. Questions and comments welcome. Cheers. Prost. PS: If you want to see other (more) CSV formats / dialects pre-configured and supported “out-of-the-box” in the new csv reader, please tell.
Evolution of Ruby String - from 1.8 to 2.5
In Ruby, a string is represented as an instance of the String class. This class has highly evolved between Ruby 1.8 and Ruby 2.5.. SEE MORE
How to log HTTParty requests using built-in loggers
Did you know that HTTParty gem provides built-in support for logging requests details? https://frontdeveloper.pl/2018/10/how-to-log-httparty-requests/?utm_source=rubyflow.com
Detecting hate speech and derogatory language
I just published a gem that connects to our hate speech detection API. We use it to analyze websites our clients link to, to ensure they don’t accidentally link to hate speech sites etc and ruin their reputation. You send text in and it sends the polarity back: 1 = hateful, 0 = nothing detected Super useful to protect schools, business websites etc. Hatefreeweb on Rubygems
csvreader v1.0 - read comma-separated values (csv) the right way (incl. hash, ...)
Hello, I’ve uploaded version 1.0 of the new comma-separated values csvreader library / gem that lets you read tabular data in the comma-separated values (csv) format the right way :-), that is, the basic methods such as Csv.read or CsvHash.read use best practices out-of-the-box with zero-configuration. Under the hood the new library includes purpose-built “backend” parsers (e.g. ParserStd, ParserStrict, ParserTab, etc.) so you can handle
all the popular comma-separated values (csv) formats / dialects such as MySQL (use Csv.mysql.read) or PostgreSQL (use Csv.postgres.read) exports and more using unix-style escapes and \N or unquoted empty values for null/nil and so on. Data is the new gold :-) Happy data / gold mining with the new csvreader library / gem (in ruby). Cheers. Prost. PS: What’s wrong (broken) in the standard csv library? See the let’s count the ways article series.
I am writing an introductory book to Rails application deployment
VPS for Makers is a book on basic web application deployment with a concrete full Ruby on Rails & PostgreSQL example. Here is the announcement. Would be happy to receive any feedback!
To Microservice or Monolith, that is the question...
The constant series of questions asked about if so and so or such and such should be better architected as microservices, or built with multiple layers of front end components hitting backend dohickies hosted within multiple layers of auto-magic hosting “silos” of data and services, shows that truly, there is way too much confusion out there on what constitutes a “good” software development approach. [more inside]
tty-box with connected borders
Latest release of tty-box adds new parameters for modifying border corners. What this means is that you can create complex layouts of seamlessly connected boxes. Enjoy!
Understanding Method Visibility In Ruby
What does public, private & protected mean in Ruby? These 3 methods control the public interface of your class. Why would you want to do that? Find out in this NEW Ruby article! https://www.rubyguides.com/2018/10/method-visibility/
render_async 2.0.0 Brings Error Handling and Loses jQuery as its Default Option
render_async 2.0.0 has just been released! [more inside]
[Tutorial] Building Live Chat Between Users in a Rails application using Planga
Planga is a new web-service that is currently in open Beta, that allows you to seamlessly integrate live chat functionality in your existing web-app. [more inside]
[Screencast] Service Objects for API Interactions with Twilio
In this episode, learn how to extract the interactions with an external API into a service object so that code is isolated and interchangeable. https://www.driftingruby.com/episodes/service-objects-for-api-interactions-with-twilio
Podcast - Generate a (static) podcast website from a folder of MP3s w/ jekyll
Hello, Pat Hawks hacked together at yesterday’ HackUIowa a new tool (in ruby). Let’s welcome - podcast - that lets you generate a (static) podcast website from a folder of MP3 files with jekyll and friends. See Herky Hack for a first sample (live) podcast. Happy publishing your radio talk shows with jekyll and friends. Cheers. Prost.#jekyllrb #podcast #mp3 #audio #id3 PS: Did you know? Octopod is another (free, open source) extension for publishing podcast episodes with jekyll.
Rails: Active Storage Removing Attachment
Now that we can add a cover picture attachment to our application the next thing we need to do is the ability to remove it. We’ll need to do a few things to get this setup. https://www.codemy.net/posts/rails-active-storage-removing-attachment
Cibyl, a lightweight curly-bracket language which compiles to Ruby and Crystal
Cibyl allows to develop Ruby and Crystal applications with a C-like syntax : [more inside]
An OpenCL backend for TensorStream
After some time I finally have an alpha version of an OpenCL backend for the TensorStream machine learning library that I have been working on for quite some time. Though my goal for TensorStream was to have a pure ruby implementation of TensorFlow, I always intended it to allow for high performance implementations by allowing various backends to be defined. [more inside]
5 security issues in Ruby on Rails apps from real life
…and how I fixed them :-) [more inside]
Glim - A new faster jekyll website compiler clone / alternative (in ruby)
Hello, Jekyll not fast enough? Why not build a compatible faster clone / alternative from scratch / zero (in ruby)? Sounds crazy? Allan Odgaard (of TextMate fame) has just done it and with about 3 000 lines of ruby code offers even more features than jekyll itself :-) e.g. built-in tags and categories for collections, lazy evaluation and parallized builds, better defaults, and much more. Find out more at the Glim website compiler source project repo. Cheers. Prost. PS: By the way - did you know? Slide Show (S9) is another jekyll-compatible clone :-) that lets you build presentations / talk slides in markdown (kramdown, really) and jekyll themes e.g. reveal.js, shower.js, bespoke.js, s6, etc.
How To Delegate Methods in Ruby
In this article you’ll learn about delegation in Ruby using 3 different methods. Method delegation allows you to pass method calls into another object so you can implement design patterns. https://www.rubyguides.com/2018/10/delegate-methods-in-ruby/
Phusion: Passenger 5.3.5 released
Version 5.3.5 of the Passenger app server fixes an issue with Ubuntu 18.04 package installation, and improves usability of crash reports: https://blog.phusion.nl/2018/10/03/passenger-5-3-5/