`/home/mastodon/live`では`direnv`を使って対話シェルでの環境を整えているのだけど、`systemd.timer`で`tootctl`あれこれをやろうして少し困っていた件が解決。

ポイントは
- `direnv exec`を使う。
- `/bin/bash -c ""`でワンライナーを実行する。
- ワンライナーの中で`eval "$(rbenv init -)"`を実行する。
- `rbenv`を`systemd-path search-binaries-default`の実行結果、つまり`systemd`から見たコマンドサーチパス(今回の環境では`/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin`なので、これは`PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin`が設定されていることに相当する)に入れる。

0

If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.tokyo/users/h12o/statuses/114608003442680197 on your instance and quote it. (Note that quoting is not supported in Mastodon.)