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
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
In this episode, we look at various tips and tricks. https://www.driftingruby.com/episodes/grab-bag-of-ruby-and-ruby-on-rails-tricks
Learn how to use machine learning models developed with Python and scikit-learn in your Rails app here.
I just released the third edition of Efficient Rails DevOps, a complete rewrite sporting more than 40 pages of additional content with lots of improvements, finally supporting both CentOS and Ubuntu operating systems and giving you the choice between MariaDB and PostgreSQL (the discount code “rbflw” still gets you $5 off).
correios-cep version 0.6.8 has been released with a parsing bug fix, since Correios API is now omitting "complemento" XML node in its responses. https://rubygems.org/gems/correios-cep/versions/0.6.8 [more inside]
https://github.com/igorkasyanchuk/new_google_recaptcha allows integrating the latest reCAPTCHA v3 and your Rails app.
Regexps are useful, neat and dangerous. Uncarefully written regular expression may hang both frontend and backend apps severely harming user experience and causing headaches at debugging stage. Read our blogpost on regexp performance to see when it could happen, understand how the regular expression engine work and what to do to optimize regexps. Benchmarks, real-word stories, step-by-step analyses and live examples included!
This article is a short study in web application design, comparing Rails to Django using a simple web form as an example.
Learn how to build auto login with Sorcery to speed up your development.
The Ruby Quiz is now back fortnightly (once every two weeks). Challenge #1 - Read Comma-Separated Values (CSV) from the “Real World”.
Let’s use the
test.csv file from Apache Commons CSV Reader. The challenge: Code a
parse method that passes the RubyQuizTest :-). Start from scratch or, yes, use any library / gem you can find. To qualify for solving the code challenge / puzzle you must pass the test. Post your code snippets on the “official” Ruby Quiz Channel,
that is, the ruby-talk mailing list. Happy hacking and data wrangling with Ruby.
PS: Thanks to RubyFlow and Peter Cooper for blocking my account. Last post (really only an edit others get blocked). See you in the free world. All the best. Cheers. Prost. PPS: If that’s how you treat your friends - how do you treat your enemies :-)..
Enkrip is Ruby gem to make your Active Record model seamlessly encrypt and decrypt your desired attributes. Under the hood it uses ActiveSupport::MessageEncryptor for encryption and decryption. https://www.railsmine.net/2018/10/introducing-enkrip.html
Using GraalVM, now it is possible to smoothly integrate R invocations into Ruby code: https://towardsdatascience.com/ruby-plotting-with-galaaz-an-example-of-tightly-coupling-ruby-and-r-in-graalvm-520b69e21021
Hello, I’ve written a new (and sixth) episode on why the CSV standard library is broken (and how to fix it). Let’s have a look at fixes in alternative CSV libraries out there: Fixes in Alternative CSV Libraries or Evolve or Die or Fast, Faster, Fasterer, Fastest 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. PS: (Update) Added Part VII or What’s Your Type? Guess. Again. And Again. And Again. Guess What’s a Schema For?
The latest version of HexaPDF adds functionality to automatically place boxes on a page and flow text around arbitrary shapes. See https://hexapdf.gettalong.org/news/2018/hexapdf-0-8-0-box-layout.html for details
In this article, we’re going to explore the following topics:
I could not find much about using HMAC-SHA256 to connect to an API. So I figured it out and wrote a blog post about it. I used Ticketmatic as an example but this will work for other API’s too. https://www.runrails.com/programming/how-to-use-hmac-sha256-to-connect-to-a-rest-api-like-ticketmatic/