Month: January 2022

Fighting an “Unknown MySQL error” when connecting to Aurora from Rails

The other day I was struggling with a very weird error when upgrading to Ruby 3. The initial migrations for a Rails app would fail with “Mysql2::Error: Unknown MySQL error (ActiveRecord::StatementInvalid)”, but only in certain environments. The error would occur when Rails tried to check what migrations are already applied by looking at the schema_migrations table.

2022-01-19 09:12:59.205 +0000 [DEBUG]    (1.7ms)  SELECT GET_LOCK('4252831219231700070', 0)
/usr/local/bundle/gems/mysql2-0.5.3/lib/mysql2/client.rb:131: warning: rb_tainted_str_new_cstr is deprecated and will be removed in Ruby 3.2
2022-01-19 09:12:59.222 +0000 [DEBUG]    (2.0ms)  SELECT `schema_migrations`.`version` FROM `schema_migrations` ORDER BY `schema_migrations`.`version` ASC
2022-01-19 09:12:59.224 +0000 [DEBUG]    (1.8ms)  SELECT RELEASE_LOCK('4252831219231700070')
rails aborted!
ActiveRecord::StatementInvalid: Mysql2::Error: Unknown MySQL error
/usr/local/bundle/gems/mysql2-0.5.3/lib/mysql2/client.rb:131:in `_query'

Ecuador

There are a few mountains other than the seven summits that I’m interested in climbing for other reasons. One of those is Chimborazo, a mountain in Ecuador that has the interesting property that its summit is further from the center of Earth than that of Mt Everest (because of the planet’s shape). It’s also a phrase my late gran used to use as an expression of “the greatest magnitude”—I think in her day that was common as it was believed to be the highest mountain. This connection is why I got interested and went on an expedition to climb Cotopaxi and Chimborazo.

Cotopaxi

検疫所が指定する宿泊施設とは

日本に戻った。簡単じゃなかった。

向こう滞在中に国がオミクロン危険地区みたいな指定食らってしまって、日本に戻るとPCR検査いくらあってもワクチンいくら打ってても問答無用で指定施設に数日いないといけない。意味不明。

到着は成田だったのでその付近のホテルが宿泊施設として指定された。ホテルの館一つまるごとがその目的に割り当てられてるっぽくて貸し切り状態。とはいえ受付済んで部屋に入ったら部屋から出られなくなるから、一階にコンビニがあってもモンエナ買いにいけずつらかった。