Software

Building a Ractor based logger that will work with non-Ractor compatible code

Recently Mike Perham shared a tweet with this comment and a code sample on the Ruby 3.0 Ractors. If this code doesn’t work, how could Rails ever work? Ractor seems fundamentally incompatible with many heavily-used Rails APIs. require ‘logger’ class Rails def self.logger @logger ||= Logger.new(STDOUT) end end Ractor.new do Rails.logger.info “Hello” end.take During the …

Building a Ractor based logger that will work with non-Ractor compatible code Read More »

How to install QGIS 3 on Ubuntu

The last days I was asked a lot, how and where to install the new QGIS 3. Until now there are no Windows binaries available (as far as I know…). But you can install and run QGIS 3.0 on Linux. If you are running Ubuntu 17.10 (artful) or even 18.04 (bionic) (beware, it’s still alpha […]

The post How to install QGIS 3 on Ubuntu first appeared on GIS-Blog.com.

How to install ESA SNAP on Ubuntu Linux

Today, someone who wants to switch from Windows to Linux asked me if I could help him run ESA SNAP on Ubuntu. I thought it would be interesting for the blog, too. For those who don’t know: ESA SNAP (Sentinel Application Platform) is the common architecture for all Sentinel Toolboxes. There is no SNAP package […]

The post How to install ESA SNAP on Ubuntu Linux first appeared on GIS-Blog.com.

OSGeo-Live: the best open source GIS ready to use package

GIS open-source? We often talk about QGis, GRASS, gvSIG and sometimes about GPSprune to edit GPX paths or JOSM to manage data from OpenStreetMap. But the software available under this type of license (open source & free software) is much wider. The live project OSGeo, is an operating system that collects most of this software and […]

The post OSGeo-Live: the best open source GIS ready to use package first appeared on GIS-Blog.com.

Karafka framework 1.4.0 Release Notes (Ruby + Kafka)

This release mostly solves problems related to message deserialization and normalizes some of the naming conventions to ease during the upgrade to the upcoming 2.0 version. Note: This release is the last release with ruby-kafka under the hood. We’ve already started the process of moving to rdkafka-ruby. Note: If you are using Sidekiq-Backend plugin, please …

Karafka framework 1.4.0 Release Notes (Ruby + Kafka) Read More »

The hidden cost of the Ruby 2.7 dot-colon method reference usage 1

The hidden cost of the Ruby 2.7 dot-colon method reference usage

Note: This case is valid also for the “old” #method method usage. The reason why I mention that in the “dot-colon” context, is the fact that due to the syntax sugar addition, this style of coding will surely be used more intensely. Note: This feature has been reverted. See details here: bugs.ruby-lang.org/issues/16275. Note: Benchmarks and …

The hidden cost of the Ruby 2.7 dot-colon method reference usage Read More »

Karafka framework 1.3.0 Release Notes (Ruby + Kafka)

Note: These release notes cover only the major changes. To learn about various bug fixes and changes, please refer to the change logs or check out the list of commits in the main Karafka repository on GitHub. TL;DR If you would prefer to see the changes in the code, here’s the upgrade PR from the …

Karafka framework 1.3.0 Release Notes (Ruby + Kafka) Read More »

How to take over a Ruby gem and what to do with it / RubyKaigi 2019 presentation

Using Ruby gems is safe, right? We’re a nice community of friendly beings that act towards the same goal: making Ruby better. But is that true? Can we just blindly use libraries, without making sure, that they are what they are supposed to be? Learn how you can take over a gem, what you can …

How to take over a Ruby gem and what to do with it / RubyKaigi 2019 presentation Read More »

Ruby on Rails HTTP Basic authentication with JSON failure message

A short snippet on how to make Ruby on Rails authenticate_or_request_with_http_basic respond with a JSON valid message upon failure. class ApplicationController < ActionController::API include( ActionController::HttpAuthentication::Basic::ControllerMethods ) before_action :http_authenticate! def http_authenticate! authenticate_or_request_with_http_basic do |key, secret| return if Resource.find_by( key: key, secret: secret ) end render( json: 'Invalid credentials'.to_json, status: 401 ) end end Cover photo by …

Ruby on Rails HTTP Basic authentication with JSON failure message Read More »