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.
Today
A Lenient Capybara
Flaky specs with Capybara seem to be a law of nature. Instead of hunting them down one after the other, we learned to stop worrying and let the rodent run.
React Components in Active Admin
I’ve revised and updated my article on creating a custom input field in Active Admin using React: https://medium.com/modern-rails/how-to-use-react-components-in-active-admin-184ff63b378d
crypto-lite Gem Update - New Examples / Cookbook - Bitcon (Base58) Address Generation
Hello, I’ve added a new examples / cookbook section to the little crypto-lite gem / library. The first example is a look inside the magic bubble machine and shows you how to generate / calculate the bitcon (base58) address form the (elliptic curve) public key in 1-2-3 steps. Cheers. Prosit 2021!
StatusCode: Our Weekly Programming Newsletter
You’re not just a Rubyist, you’re a software developer, right? :-) Check out StatusCode Weekly, our language and architecture agnostic newsletter that covers the biggest news across the entire software development world.
Debugging with pry-byebug: moving in the stack frame
Let’s be honest, debugging just never really ends, right? The more you learn, the more debugging becomes complex. Here’s a write up about some cool pry-byebug
features: moving in the stack frame, adding breakpoints on the fly, aliases
Interact with Mysql Server using mysql2 gem [Part 2] – Insert and Update Operations
This tutorial shows how to interact with the MySQL server using mysql2 gem by adding additional methods to help us perform insert and update operations. Link: https://thedevpost.com/blog/update-insert-using-mysql2-gem/
New command option parser benry-cmdopt (and why not optparse?)
New command option parser benry-cmdopt gem released, and
Why new command option parser required instead of standard optparse.rb
?
Refactoring Filters
Recently I was working on refactoring some unwieldy code for filtering data. Here’s a short story of how it went: https://tejasbubane.github.io/posts/2021-01-17-refactoring-filters/
base58-alphabets gem V1.0 - base58 encode / decode numbers, hex or binary strings
Hello, I have put together a new base58-alphabets gem that lets you base58 encode / decode numbers, hex or binary strings (incl. leading zeros) with Bitcon or Flickr base58 notation / alphabet. Cheers. Prosit 2021! PS: The base58 / unbase58 methods will be shortly part of the crypto-lite gem / family but you can use the “zero-dependency” gem of course standalone too.
Time travel in Rails app in development (or other env) from UI
https://github.com/igorkasyanchuk/rails_time_travel for easier testing and creating objects in the “past” you can use this gem. It’s bringing a UI page with an interface to change the current time.
Run fast RSpec tests with GitHub Actions parallel jobs
Example of how to configure Github Actions and its parallel jobs to run faster Ruby tests. https://docs.knapsackpro.com/2019/how-to-run-rspec-on-github-actions-for-ruby-on-rails-app-using-parallel-jobs
Kafka for Rubyists Mini Course: Advanced Kafka
Another part of the Kafka for Rubyists Course, this time focusing on some more advanced aspects of Kafka. [more inside]
Billing Extraction: A Tale of GraphQL Internal API Optimization
In Billing Extraction: A Tale of GraphQL Internal API Optimization we describe how we migrated an internal API form a slow REST implementation to an optimized GraphQL-based one. Read to learn what we did to make it safe, what patterns we used (and rediscovered) and what mistakes we made ;).
crypto-lite Gem - cryptographic secure hash functions and public key signature algos
Hello, I’ve put together a little crypto library / gem, that is, crypto-lite - cryptographic secure hash functions and public key signature algorithms made easy (incl. sha256, rsa, etc.). Cheers. Prosit 2021! PS: New to crypto (programming)? See the Best of Crypto Books.
Magic Responsive Tables with Stimulus and IntersectionObserver
Using Stimulus and Rails server-rendered HTML to build a responsive scrolling data table [more inside]
Building, Testing and Deploying AWS Lambda Functions in Ruby
For quick, scalable, highly-available web services, few options compare to AWS Lambda. Just provide your code, add a little configuration, and you’re done! In this article, Milap Neupane will introduce us to Lambda, show us how to get it working with Ruby and the Serverless Framework, and discuss reasons to use — or to not use! — Lambda in production. https://www.honeybadger.io/blog/ruby-aws-lambda/
The Most Common Types of Technical Debt in Rails
One of our software engineers wrote a blog post about the most common types of tech debt we encounter in our projects and I thought it might be useful here. Common kids of technical debt in rails projects.
Serverless Ruby on Rails on AWS Lambda [Example app]
Recently Lamby was announced which helps you to bundle up your Ruby on Rails application and push it to AWS Lambda. That’s right you can now run Ruby on Rails applications on AWS Lambda ! [more inside]
Easy Automated Rails Tests with Github Actions
Modern software development typically includes some form of continuous integration and delivery. An essential part of CI/CD is automated tests. Github Actions is a quick and easy way to do automated testing. This is my “starter workflow” for automated Rails tests in Github Actions! [more inside]
New release of activerecord-analyze gem
The new release of https://github.com/pawurb/activerecord-analyze gem supports custom plan output formats and all the other PostgreSQL EXPLAIN ANALYZE options.
access logs and execute shell commands on the staging server
https://github.com/igorkasyanchuk/sweet_staging who needs a solution to “tail” staging.log on the server? Or execute a code in the rails console. Or check if the process is running in the OS? [more inside]