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.
new Rails 6 feature: SQL efficient bulk insert/upsert
https://github.com/rails/rails/pull/35077 was finally merged. You can find more details in my blog post.
Might be useful gem in development (and prod)
https://github.com/igorkasyanchuk/execute_sql gem which allows executing custom SQL queries directly in rails console or in any other parts of the app.
Simple Rails & AWS Lambda Integration using Rack
Introducing Lamby. Simple Rails & AWS Lambda Integration using Rack. The goal of this project is to provide minimal code along with comprehensive documentation to get your Rails application running under AWS Lambda. https://technology.customink.com/blog/2019/03/13/rails-on-aws-lambda-with-sam/
A little guide to converting jQuery to Stimulus
I’ve been refactoring my existing apps from jQuery snippets to Stimulus controllers, and I thought it’d be helpful to put down some of the patterns I found. https://johnbeatty.co/2019/03/13/convert-your-jquery-snippet-to-a-stimulus-controller/
Building a Slack App using Ruby and Sinatra
Creating a Surf forecasting tool using Slack Slash Commands and Actions. https://dev.to/runtime-revolution/building-a-slack-app-using-ruby-and-sinatra-2ie4
Code Your Own (Crypto Blockchain) Contracts w/ Ruby (sruby), Universum & Co
Hello, World premiere! The talk notes titled “Contracts, Contracts, Contracts - Code Your Own (Crypto Blockchain) Contracts w/ Ruby (sruby), Universum & Co” from the world’s first official (secure) ruby talk at last nights Vienna Ruby (Crypto) meetup incl. What’s a (Smart) Contract? ++ History of Contract-Oriented Programming Languages (on the Blockchain) ++ 10 Contract Examples and more. Happy coding with (secure) ruby. Cheers. Prost.
Ruby scheduled tasks with RabbitMQ using bunny gem
How to setup ruby retry/scheduled task queues with dead letter exchanges in RabbitMQ using bunny gem. https://link.medium.com/OjpQu9H80U
Hate speech detection open source
Hi there, I just added hate speech detection to my site analytics platform. Please star it if you like it:) https://github.com/nikoma/webwithoutborders
How to use ActionText custom attachments in Rails 6
Rails 6 introduces ActionText which is a way to edit and display rich text. We can use it to create @mentions and other features as custom attachments to reference models in our app. When a model changes (like a user changes their avatar) our rich text automatically updates. Watch how to build @mentions with ActionText in Rails 6
units-time library / gem v1.0 - units of time (in epoch time) for secure ruby (sruby)
Hello, I’ve put together a “standalone” library / gem for units of time (in epoch time) incl. seconds, minutes, hours, days, weeks, fortnights, years and more. The units-time library / gem includes two new types too, that is, Timestamp and Timedelta. Happy coding with (secure) ruby. Cheers. Prost. PS: The new units-time 1.0 library is part of the safe data structures series.
Unicode::X 12
Unicodex is a way to work with the latest version of Unicode. It currently supports detecting emoji, comparing confusable strings, extracting the numerical value of a codepoint and more. Do you have ideas to make it even more useful? Happy to get feedback.
"99 Bottles of OOP" book review
Review of Object-Oriented Design book “99 Bottles of OOP” by Sandi Metz and Katrina Owen. [more inside]
How to setup Ruby Object Mapper (ROM) for standalone project
Detailed guide on how to setup Ruby Objec Mapper(rom-rb) for stand-alone project without frameworks. https://link.medium.com/cdFP3BCVXU
Web site analytics and lead generation open source
I have just open sourced the Web Without Borders code. You can use it to analyze websites for site speed, link analytics, hate speech detection, web accessibility and more. https://github.com/nikoma/webwithoutborders
A gem that displays a backtrace for each ActiveRecord SQL query
The ActiveRecord Query Trace gem displays a backtrace for each query that appears in Rails’ development console and log. Useful for performance optimizations and for finding where to start when making changes to a large application.
Awesome Rubies Updated (Now Incl. mruby/c, sruby (s6), and More)
Hello, I’ve updated the Awesome Rubies page that collects compilers, interpreters, virtual machines, parsers, doc generators, version managers, and more. What’s news? Let’s welcome mruby/c, sruby (s6) and more. Anything missing? Let us know. Happy coding with rubies. Cheers. Prost.
Chrome as a service for Rails system testing
Since it is more and more painful to install awesome capybara-webkit I have started to look around for some reasonable replacement. My requirements are really simple. It must be really easy to use it locally for developers and it should be possible to run it in containerized environment (Docker on CI in my case). Result? See https://medium.com/@retrorubies/chrome-as-a-service-for-rails-testing-b1a45e70fec1 .
Interview with Javan Makhmali and Sam Stephenson from Basecamp
In this episode of Remote Ruby, Javan Makhmali and Sam Stephenson join Jason and Chris. Sam and Javan are employees at Basecamp and also part of the mastermind behind many JavaScript libraries to come out of Basecamp: Turbolinks, Trix, and Stimulus. They each share how they got started programming, a brief insight into how they work at Basecamp, the transition from CoffeeScript to ES6, Typescript, as well as (wait for it…) upcoming features in Stimulus (🙌) and considerations for Turbolinks 6 (no feature promises made 😉). It was an absolute joy to chat with Javan and Sam. We very much enjoyed this episode and hope you will enjoy it, too. [more inside]
RubyConf Thailand CfP Opened
The CfP for the first ever RubyConf Thailand just opened, submit your proposals.
Deploying Sinatra microservices to DigitalOcean Kubernetes
This tutorial shows you how to implement a Semaphore CI/CD pipeline for a Sinatra app: [more inside]
Return associations with additional records
https://github.com/igorkasyanchuk/with_record this gem was created in 30 minutes to solve one problem with missed User in the dropdown in my one form. User was before softy-deleted, and I’ve got in “edit” form a blank select. But I need to show him in this form so on “update” I won’t override it to NULL. [more inside]
Deploying ML Models for Ruby applications
Building Machine Learning models is amazing, but it’s only the moment you connect the two — this model and your application, that can apply the prediction to the user’s interaction, that is the most amazing experience of all. Let’s train a simple ML Model and integrate it with Ruby application - it’s not that difficult to start!
How to add CSS Frameworks to a Rails 5.1+ application
You don’t need a gem to add CSS frameworks to your Rails apps. Learn how to add Bulma easily with yarn and the asset pipeline, then yarn and Webpacker: How to add CSS Frameworks to a Rails 5.1+ application
Why don't we validate controller parameters?
How my one silly typo caused an avalanche of 500 errors (aka strong parameters are not enough to make RoR app secure enough) https://frontdeveloper.pl/2019/03/why-dont-we-validate-controller-parameters