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.
Active window time logger (Linux)
Time Management Tool. I’ve written a Ruby gem that grabs the current active window name every 15 seconds and catalogs the time. Help keep track of productive/unproductive time. As I consider this a very helpful tool I felt this would be appropriate to share. See the gem clock_window.
Purify your programs with capability objects
Introduction to capability objects. Also a discussion of how to use these to improve the effective purity of functions. All with the aim to improve modularity in your programs. http://insights.workshop14.io/2016/05/01/purify-your-programs-with-capability-objects.html [more inside]
Sentiment Analysis basics in Rails
Learn how to do sentiment analysis in Rails to calculate whether content is positive, negative, or neutral using the Sentimental gem.
Using Service Worker on Rails
So far there hasn’t been a good story for using the new JavaScript API, Service Worker, in Rails applications – until now! Service workers come with some unique requirements for deployment that don’t play nice with the default behavior of the Rails asset pipeline. My latest post shows how I approached this problem and packaged my solution into a new Ruby gem. https://rossta.net/blog/service-worker-on-rails.html
Useful Utilities included in RubyGems & Confusing Hash Behavior
Good: You can use RubyGems itself to detect your OS, gzip compress strings, get a console password prompt, and more! Bad: The API for making hashes compare by object identity is not the most optimal!
How to Generate Weighted Random Numbers
Learn how you can write simple algorithms to pick weighted random numbers. http://www.blackbytes.info/2016/05/weighted-random-numbers/
Imagetragick and How to Protect Ruby Apps from it
There is a huge vulnerability in ImageMagick. In layman’s terms, if you are doing any kind of image manipulations like uploading avatars, photos, resizing stuff, you are most likely using ImageMagick and it concerns you. In theory, by uploading a specially crafted file (which may be not an image at all or an SVG image with some “features”), the attacker can gain access to your system. This is VERY bad. The “trademark” for it is Imagetragick: https://imagetragick.com/ Sysadmins should install a special policy file on their systems ASAP. [more inside]
Cells 4.1: Block Support, Better Collections, External Layouts!
Cells is a view model implementation for Ruby. The 4.1 release allows injecting external layout cells, finally supports block yielding in views, has a cool new collection API to render lists of cells, and much more.
[Pre-Launch] Your Virtual Rails Client
You taught yourself Ruby & Rails using books and online courses, but you don’t know how to build something useful from scratch? You don’t have an idea or can’t find existing projects to gain practical experience? [more inside]
Volt – A New Framework for Ruby
Volt - a new Framework for Ruby where both the server and client sides are written in Ruby via OPAL (a ruby to JavaScript compiler) so developer can write dynamic applications without writing a single JavaScript code.
The biggest Rails code smell you should avoid to keep your app healthy
I’ve chosen the biggest (IMO) Rails code smell I encounter very often and described why it’s bad and how to fix it.
Rails 5 adds a way to get information about types of failed validations
We can now get more details about the types of failed validations in Rails 5. [more inside]
Spring Cleaning: Replacing Resque with Sidekiq
How Vinted replaced Resque with Sidekiq and is happier for it: Spring Cleaning: Replacing Resque with Sidekiq
rails-api-base
rails-api-base: Rails 5 RESTful api template. Check it out here!
Mighty String now at version 1.0.2
Powerful methods for your strings. This version adds some bisection methods and Travis CI integration. See the repo: MightyString. Use: gem 'mightystring'
Ruby Error Cheatsheet
Idiosyncratic Ruby is back! The second season begins with a comprehensive overview of all default Ruby exceptions, and then takes a look at how extremely Ruby’s syntax utilizes some ASCII characters.
Gem Dependency Issues with Rails 5 Beta
An investigation into the steps required to install one popular gem (rails_admin) in a Rails 5 beta3 project. [more inside]
Object Oriented Ruby
I have been seeing a lot influence in ruby from Functional programming and not as such in ruby itself but in code written in ruby. Developers try new things, they are fascinated by other languages, how they solve problems. They try to change ruby into functional language, they loose sight of how problems can be solved in the Object Oriented Programming. Let’s do a refresher of some most important aspects of OOP. Read more on OORuby
Deploying sinatra web application to google clouds platform
Creating basic ‘hello world’ app with sinatra and deployment to google clouds platform. http://warolv.net/blog/2016/04/29/deploying-sinatra-web-application-to-google-clouds-platform/
[Screencast] WYSIWYG Editor with Summernote
Integrate Summernote WYSIWYG Editor into your application. Learn how to use AJAX callbacks to filestore your images instead of database Base64. https://www.driftingruby.com/episodes/wysiwyg-editor-with-summernote
Introduction to blocks in Ruby
Check out my new blog called Zen Ruby. The first post is an introduction to blocks. Your comments and suggestions will be greatly appreciated.
Spreadsheet Architect v1.4.0 Released
I’ve just released a new version of the gem Spreadsheet Architect. Previously the only way to use it was to include it in a class/model. This release adds the ability to create XLSX, ODS, & CSV spreadsheets without the class/model using an array of data. https://github.com/westonganger/spreadsheet_architect
New gem "acts_as_encryptable"
Simplified record encryption. Implemented to integrate with Rails existing encryption methods. See the repository: acts_as_encryptable
Stackprofin' to N+1 query detection
Getting to the line-of-code of problematic N+1 SQL queries in production is…hard. A deep dive into how we used Stackprof to add N+1 detection to Scout.