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.
5 Benefits of Immutable Objects Worth Considering for Your Next Project
5 Benefits of Immutable Objects Worth Considering for Your Next Project As a ruby developer, immutability is thrown around by functional programming aficionados for awhile. as a skeptic I've passed it off as a buzzword and kept moving along. I recently started learning elixir and it popped up again, so I wanted to get a deep understanding of what the concept is and how it benefits our software in the real-world...
New Random Ruby Newsletter Issue
26th issue of Random Ruby email newsletter. Several interesting articles and tools from Ruby world inside: http://newsletter.frey.su/issues/random-ruby-issue-26-64118
[Screencast] Creating Custom Ruby on Rails Generators
Simplify your workflow by using custom generators to streamline the creation of files and templates that you use often. https://www.driftingruby.com/episodes/creating-custom-ruby-on-rails-generators
SEO Tools For Your APIQ CMS Website
Check out how to setup SEO tools for APIQ CMS based website.
Super Secret Methods
It is possible to define and call secret methods, that are impossible to access via normal Ruby syntax.
Nim for the discerning Rubyist
Nim is a flexible, fast and concise language that can be used alongside Ruby to provide integrated solutions to a wide-range of problems. In this post I demonstrate how we can delegate tasks that require high-performance or parallelisation from Ruby to Nim, with ease.
What Is A Complete Feature: A Developer's Perspective
As a developer, what does a complete feature mean? Read on for the different levels of completeness, what they mean for you and your dev team. [more inside]
Implementing inheritance with params: CreateProducts ActiveRecord::Migration[5.0]
In Rails 5 each migration class is inherited from ActiveRecord::Migration[5.0].
In this article I’ll describe why we need it and how to implement inheritance with params.
http://rubyblog.pro/2017/07/implementing-inheritance-with-params
Machine Learning: Support Vector Machine with Ruby
New tutorial on SVM landed on our Ruby Machine Learning list. Read that and other tutorials: https://github.com/arbox/machine-learning-with-ruby#sparkles-tutorials [more inside]
Integration Overcommit with static analysis tools
Using Git hooks to control code quality for Ruby, Rails and Chef https://medium.com/@kirill_shevch/lint-your-ruby-code-with-overcommit-and-static-analysis-tools-bd36d3147d2e
GEM rabitmq-spec: document and automate your RabitMQ setup
Configure RabbitMQ using this gem: https://github.com/viniciusoyama/rabbitmq-spec . Create specification files documenting your exchanges, queues and bindings so that you can evaluate them and automatically configure your RabbitMQ instance.
tty-pager v0.8.0
Newest tty-pager fixes support on Windows and allows to enforce pager command. Give it a try!
Lessons learned from first attempt of dockerizing Ruby on Rails app
Check what I’ve learned when was trying to build a Docker image: https://medium.com/@igor.petrov/lessons-learned-from-first-attempt-of-dockerizing-ruby-on-rails-app-7e5eb9004265
Implementing Layered Architecture With Dependency Inversion Principle
Implementing Hexagonal architecture following Dependency Inversion Principle. http://rubyblog.pro/2017/07/solid-dependency-inversion-principle
My sins against Webpacker/Yarn and compiled Rails assets
The what and why behind checking yarn ‘packages’ and compiled assets into git [more inside]
Virus Scanning Rails Carrierwave Uploads
Carrierwave::AttachmentScanner is a new gem to send Carrierwave uploads to the AttachmentScanner service to scan them for viruses or malware before accepting the uploaded file.
View Objects – The Way to Deal with Messy Rails Views
As your view begins to contain more complex logic, you can encounter all kinds of problems. First, it can be problematic to test. Second, your code becomes less readable and harder to modify. That’s when View Objects might be helpful. [more inside]
JSON: 1.1 # JSON with Extensions (JSONX) - New JSON (Next) Format w/ json-next gem
Hello, I’ve updated the JSON readers gem now called json-next, formerly jasony. The next next generation JSON parser / reader included is a world-wide ruby’s 1st - JSONX.parse for the new JSON: 1.1 # JSON with Extensions (JSONX) format. Using JSONX you can use all the JSON extension of HanSON (JSON for Humans) and SON (Simple Object Notation) and some more e.g. use Ruby (Shell)-like #-comments, unquoted keys, optional commas, and much more. Note: JSONX.parse is the same as JSON.parse( JSONX.convert(text)), that is, JSONX works like a preprocessor for JSON. Cheers. PS: What’s your favorite JSON format? e.g. “Vanilla” JSON 1.0 or JSON5 or HJSON or HanSON or SON or CSON or USON or JSONX/JSON11/JSON XI/JSONII.
A Few RSpec Helpful Hints
Two main frameworks dominate the Ruby testing world: Rspec and MiniTest. RSpec is a very expressive testing framework with many great features and helpers to make tests readable. When writing RSpec tests, here are just a few not so obvious hints that could make tests even easier to write, read, and maintain.
My journey from Rspec feature tests to Rails system tests
Some of my trials and tribulations of getting headless system tests to work reliably in Rails… https://dev.to/dstull/my-journey-from-rspec-feature-tests-to-rails-system-tests
Serving Requests with Single File Rails Applications
After we’ve packed our Rails application into a single file lsat time, I’ll show you this time how to actually start a webserver and serve requests: https://christoph.luppri.ch/articles/2017/07/12/single-file-rails-applications-serving-requests/
Two tests you should run against your Ruby project now
At Brighton Ruby, Andrew Nesbitt shared some of the hidden costs of open source as well as some ways to mitigate. In this post I share two of the things you should check about the dependencies in your project; their security vulnerabilities and licenses.
How Kingmakers Build Rails Products
How do professional Rails developers convey that they don’t just know their way around Rails projects, but they can also be of value when it comes to solving business problems with software? For those of you you don’t know, here’s how to use The 2SC Framework to ship web products »