“...I've been working since 2008 with Ruby / Ruby on Rails, love a bit of Elixir / Phoenix and learning Rust. I also poke through other people's code and make PRs for OpenSource Ruby projects that sometimes make it. Currently working for InPay...”

Rob Lacey
Senior Software Engineer, UK

Encoding::CompatibilityError: incompatible character encodings: UTF-8 and ASCII-8BIT

Comparison of a UTF-8 string and an ASCII-8BIT string fails.


2.2.2 :031 > "∞".force_encoding('UTF-8').include?("∞".force_encoding('ASCII-8BIT'))
Encoding::CompatibilityError: incompatible character encodings: UTF-8 and ASCII-8BIT
	from (irb):31:in `include?'
	from (irb):31
	from /Users/roblacey/.rvm/gems/ruby-2.2.2@upgrade-ruby2/gems/railties-3.2.22/lib/rails/commands/console.rb:47:in `start'
	from /Users/roblacey/.rvm/gems/ruby-2.2.2@upgrade-ruby2/gems/railties-3.2.22/lib/rails/commands/console.rb:8:in `start'
	from /Users/roblacey/.rvm/gems/ruby-2.2.2@upgrade-ruby2/gems/railties-3.2.22/lib/rails/commands.rb:41:in `<top (required)>'
	from script/rails:6:in `require'
	from script/rails:6:in `<main>'

GPK of the Day Charred CHAD