今年の5月に仕事用キーボードとしてErgoDox EZ (組み立て済みErgoDox) を購入し、半年が経ちました。ErgoDoxのメリットの一つとしてキーマップのカスタマイズ性の高さがありますが、一方で「Pキーの右にたった一列しか場所がない」という特殊な形状のため、キー配置をどうカスタマイズしても慣れるまでに多少の練習が必要になるという問題もあります。
This blog is implemented with sinatra-activerecord and deployed with Capistrano 3.
Today I needed to add some modification to the DB schema, then I found that DB migration does not works well when I do cap production deploy.
Reason
sinatra-activerecord provides a rake task to run DB migration like rake db:migrate RACK_ENV=production. Note that the envvar is RACK_ENV, not RAILS_ENV. This does make sense because it is not a gem for Rails. However, you cannot run migration with capistrano-rails by this reason.
Solution
So here is my new settings in the config/deploy.rb. This is mostly the same as what capistrano/rails/migrations does, except the envvar is rack_env.