Unable to install libv8, therubyracer or mini_racer with bundler

This blog posts explains how to get rid of the installation error when installing therubyracer or mini_racer with bundler 2.2 ...

June 16, 2021 · Codefabrik GmbH

Introducing the hitman gem

Hitman Hitman is a web fuzzer written in Ruby for Grape APIs. You can use it to check the robustness of your parameter validations by targeting your own server. Purpose Did you ever have to create a server API but were not sure if you had covered all possible and impossible inputs? If not, users might sooner or later fill your database with invalid data and your application might break. In practice, it’s almost impossible to anticipate all possibilities of usage of your API....

February 4, 2016 · Codefabrik GmbH

Ruby secrets #1: Array#flatten

You probably have at least heard of or even used the Array#flatten method. It returns a flat, one-dimensional copy of the original array: > ary = [[1, 2, 3], [3, 4, 5], [4, 5, 6], [7, 8, 9]] > ary.flatten => [1, 2, 3, 3, 4, 5, 4, 5, 6, 7, 8, 9] Pretty straight-forward, but still a cool feature. But wait, there’s more awesomeness. Array#flatten takes an optional argument that sets the maximum recurstion depth of the flatten calls, making it possible to flatten an array only partially:...

December 23, 2013 · Codefabrik GmbH

How to fix `Gem::ConfigFile::RbConfig (NameError)` in Ruby 1.9.1

I recently had to use a very very old Ruby version for a legacy project. I installed version 1.9.1 via RVM on my Ubuntu 13.04 machine and everything seemed to work great. Until I tried to install the Rails 2.0.2 gem, which produced the following error: /home/me/.rvm/rubies/ruby-1.9.1-p431/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:82:in `rescue in rescue in <class:ConfigFile>': uninitialized constant Gem::ConfigFile::RbConfig (NameError) from /home/me/.rvm/rubies/ruby-1.9.1-p431/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:64:in `rescue in <class:ConfigFile>' from /home/me/.rvm/rubies/ruby-1.9.1-p431/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:60:in `<class:ConfigFile>' from /home/me/.rvm/rubies/ruby-1.9.1-p431/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:36:in `<top (required)>' from /home/me/.rvm/rubies/ruby-1.9.1-p431/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:9:in `require' from /home/me/....

September 6, 2013 · Codefabrik GmbH