View 00-faillog.txt
remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
remote:
remote: current directory:
remote: /tmp/build_0a3b28f1eec68065064b0713c9d97b3a/vendor/bundle/ruby/2.4.0/gems/charlock_holmes-0.7.5/ext/charlock_holmes
remote: /tmp/build_0a3b28f1eec68065064b0713c9d97b3a/vendor/ruby-2.4.1/bin/ruby -r
remote: ./siteconf20170913-2062-1bdbmp7.rb extconf.rb
remote: checking for -licui18n... yes
remote: checking for -licui18n... yes
remote: checking for unicode/ucnv.h... yes
remote: checking for -lz... yes
View redis-offline.md

Mastodonの稼働中にRedisが落ちるとどうなるか、今朝のログを眺めてみました。

まず気づいたのはSidekiqのコネクションプールだった様子:

Aug 20 17:56:49 ERROR: heartbeat: Error connecting to Redis (Redis::TimeoutError) 
  :
Aug 20 17:56:49 ERROR: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.0.4/lib/sidekiq/fetch.rb:36:in `block in retrieve_work' 
Aug 20 17:56:49 ERROR: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.0.4/lib/sidekiq.rb:95:in `block in redis' 
Aug 20 17:56:49 ERROR: /app/vendor/bundle/ruby/2.4.0/gems/connection_pool-2.2.1/lib/connection_pool.rb:64:in `block (2 levels) in with' 
View trial-on-freebsd.sh
$ uname -srm
FreeBSD 11.0-RELEASE-p9 amd64
$ su
# pkg install ruby-2.3.4_1,1
# pkg install git-2.13.2
# exit
$ git clone https://github.com/tootsuite/mastodon.git
$ cd mastodon
$ ruby -v -rpsych -e 'p Psych.load(IO.read("config/sidekiq.yml"))'
ruby 2.3.4p301 (2017-03-30 revision 58214) [amd64-freebsd11]
View deploy.md

rake mastodon:maintenance:prepare_for_foreign_keys needs to run.

Merge

$ git checkout master
$ git fetch upstream
$ git rev-parse upstream/master
75c6513c678148e9a6adfcda57cfd5c8a16c804a
$ git rebase upstream/master
View gist:1945febe43bd51e04d22e465377d82d6
StandardError: An error has occurred, this and all later migrations canceled:
PG::ForeignKeyViolation: ERROR: insert or update on table "statuses" violates foreign key constraint "fk_rails_94a6f70399"
DETAIL: Key (in_reply_to_id)=(14576) is not present in table "statuses".
: ALTER TABLE "statuses" ADD CONSTRAINT "fk_rails_94a6f70399"
FOREIGN KEY ("in_reply_to_id")
REFERENCES "statuses" ("id")
ON DELETE SET NULL
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
View running-spec-on-mastoon.md

Mastodonのrake specを走らせられるようにする

Dockerの外でやらないといけない感じなのかな?

rbenv

$ git clone https://github.com/rbenv/rbenv.git ~/.rbenv
$ cd ~/.rbenv && src/configure && make -C src
$ cat << _END > ~/.bashrc
View aws-ip-range.rb
#!/usr/bin/ruby
require 'open-uri'
require 'json'
require 'ipaddr'
require 'pp'
prefixes = Hash.new
source = 'https://ip-ranges.amazonaws.com/ip-ranges.json'
JSON.parse(URI::parse(source).read)['prefixes'].each do |e|
View keybase.md

Keybase proof

I hereby claim:

  • I am zunda on github.
  • I am zunda (https://keybase.io/zunda) on keybase.
  • I have a public key whose fingerprint is C31D 6E88 8EEB 6DAC EA88 1A8C 7BF7 154E 0B17 0373

To claim this, I am signing this object:

View gist:b64afa2d446b47377e92e7722d71f13f
$ rbenv install 2.4.0-dev
Cloning https://github.com/ruby/ruby.git...
Installing ruby-trunk...
BUILD FAILED (OS X 10.11.6 using ruby-build 20160426)
Inspect or clean up the working tree at /var/folders/b5/rsnrc9zj3b9c32qqt6z6py51cq36q1/T/ruby-build.20161008132243.93304
Results logged to /var/folders/b5/rsnrc9zj3b9c32qqt6z6py51cq36q1/T/ruby-build.20161008132243.93304.log
Last 10 log lines:
View 51-kensington.conf
Section "InputClass"
Identifier "Trackball with Middle Button Emulation"
MatchProduct "Primax Kensington Eagle Trackball"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "Emulate3Buttons" "True"
EndSection