私は git を使って文字列を比較しています (理由は下に書きました)。私のマシンでの開発では動作しますが、では動作しませんHeroku。
`git diff $(echo "hi" | git hash-object -w --stdin) $(echo "hello" | git hash-object -w --stdin) --word-diff`
次のエラーが表示されます。
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Not a git repository
To compare two paths outside a working tree:
usage: git diff [--no-index] <path> <path>
このコマンドを動作させる方法を知っている人はいますHerokuか? (ちなみに、usage:ヒントは問題を解決しません)。
アップデート
Heroku のサポートは、サーバーに git を手動でインストールできるように、このビルドパックを案内してくれました。解決策は、以下の私の答えにあります。