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.
Login as another user with devise_masquerade
This week on GoRails, we cover impersonating other users with the devise_masquerade gem.
JQuery-Free Rails and Legacy Browsers
Rails 5.1 will no longer depend on JQuery. I ran the UJS test suite on several versions of IE to see how nicely the new system plays with legacy browsers. - http://blog.honeybadger.io/jquery-free-rails-and-legacy-browsers/
Lite Cable – Rails-free Action Cable
Lite Cable (https://github.com/palkan/litecable) is a lightweight Action Cable implementation with business logic (channels, streams, etc) separated from low-level server implementation. [more inside]
How hash became faster in Ruby 2.4
The internal implementation of hash was changed in Ruby 2.4, such that it became faster out of the box. http://blog.redpanthers.co/behind-scenes-hash-table-performance-ruby-2-4/
Merge sidekiq jobs for bulk notifications
I made sidekiq middleware which enables to merge jobs occurring before the execution time. Please check and try it and tell me your feedbacks! [more inside]
Mastering Roda eBook
I’m in the process of writing an eBook about Roda. [more inside]
Learn how to achieve parallelism with Ruby MRI using I/O bound threads
Even with MRI’s GIL, you can achieve parallelism with Ruby when using IO-bound threads.
Thredded v0.9.4: Post preview, math, and more
Thredded, the best Rails forums engine, has just released v0.9.4. This release adds preview-as-you-type, a server-side rendered math plugin via KaTeX, and more. [more inside]
Event Sourcing - a practical example using Ruby
A blog article where I show how the many different concepts of event sourcing can come together.
SmartSeeds - gem for smart auto generating of new records with random values
https://github.com/Frylock13/smart_seeds It determines types of fields(attributes) of an ActiveRecord model and creates records with random values for each of these attributes. [more inside]
Adding Active Admin to a Rails 5 API Application
Rails 5 API applications don’t include the view-rendering functionality that Active Admin (and other admin dashboard gems) require in order to work. Nonetheless, we still want to use those admin panels to visualize and manage our API data, without having to abandon API-mode altogether. Here’s how to have the best of both worlds by installing Active Admin on a Rails 5 API-only app
ROM 3.0 Released
Check out the official announcement of rom 3.0.0 that ships with rom-sql 1.0.0 and rom-repository 1.0.0.
[Screencast] Searchkick and Elasticsearch
Add full text searching using Searchkick and Elasticsearch. Here I will show the steps involved in adding this search to an existing application and a sample of autocomplete functionality. https://www.driftingruby.com/episodes/searchkick-and-elasticsearch
Omnivore API with Ruby on Rails
Accessing Omnivore API with Ruby on Rails [more inside]
TTY 0.6.0 release with new website!
The terminal toolkit tty sports a new shiny website and adds new components such as tty-file or tty-editor. Enjoy!
SpreadsheetArchitect v2.0.0 Released!
I just released v2.0.0 of my gem SpreadsheetArchitect. It includes many new styling features, enhanced cell types, multi-sheet creation capabilities, and much more. If you have not heard of it before, this library makes spreadsheet generation a breeze. https://github.com/westonganger/spreadsheet_architect
Efficiently Reindex Data in Searchkick 1
http://blog.nrowegt.com/event-driven-elasticsearch-bulk-updates/ explains how to setup efficient bulk reindexing for searchkick and elasticsearch using Rails callbacks and redis. Prior to Searchkick 2’s functionality, this is how bulk background reindexing was best implemented.
Using EXPLAIN ANALYZE to debug slow SQL queries
https://product.reverb.com/using-explain-analyze-to-debug-a-slow-sql-query-870f6d8ea161 - Learn by example how we debugged a slow query on Reverb.com by using EXPLAIN ANALYZE.
AnyLogin - gem to quickly login as any user
https://github.com/igorkasyanchuk/any_login Using Devise? Do you want to login as any user in system?
Flutterby Event Handling
I’m building a static site generator that can also be used as a full-on web application framework. Or is it a web application framework that can also be used as a static site generator? Seriously, what is this thing? Have I simply had too much chocolate milk again? [more inside]
acts_as_list refactoring part 2
In part 2 I continue refactoring acts_as_list Rails gem. I touch on better naming, mass assignment protection, singleton methods. [more inside]
The Importance of Benchmarking on Production: Redis Edition
There comes a time to benchmark your application and its services . However, if it’s not done properly, then your results can very misleading. In this post, I’ll throw some numbers at you to demonstrate the massive differences between benchmarking locally, on production, and locally pointing at a cloud resource. The numbers for each set of tests are different by an order of magnitude, demonstrating the importance of using the proper setup. [more inside]
Parsing PDFs using Tika and Nokogiri and indexing them for searching using Algolia
A step-by-step blog post I made showing how to use Apache Tika to extract text from a PDF file (it supports thousands of other files), parsing the resulting HTML with Nokogiri, then getting the resulting data easily indexed and searchable using Algolia.
A Secure JWT Authentication Implementation for Rack and Rails
I would like to share two Ruby libraries I made in order to implement some security tips in JWT token authentication. One of them is warden-jwt_auth, which can be used in any Rack application that uses Warden as authentication library. The other one is devise-jwt, which is just a thin layer on top of the first that automatically configures for devise and, subsequently, for Ruby on Rails. [more inside]
Rails DB version 1.4.1
let me just notify you about fixing an old issue with STI models and Rails DB gem. Now this issue is finally gone + added more specs to make sure it works in Rails 5. [more inside]