Kouhei Sutou
kou****@clear*****
2014年 9月 15日 (月) 20:50:20 JST
須藤です。 In <CAH9Y0y6G0C3ZrjefwaNgvDK7Ag1L2q3LbuO1Unp=i9cgr****@mail*****> "[groonga-dev,02773] Re: Heroku用Groongaの形態素解析対応について" on Mon, 15 Sep 2014 18:34:13 +0900, 杉本涼 <sugry****@gmail*****> wrote: > 何回も試しているのですがなかなか成功しません。 > 助けてください! はい! 困ったときに相談してくれてありがとうございます! > たぶん、MeCabの辞書のNAIST-jdicのビルドのところで > エラーが発生しているのだと思います。 そうですね。ここですね。 https://gist.github.com/sugryo/6cc5547ca9accb0aa888#file-naist_jdic-txt-L30-L33 if ! [ -d /etc/mecab/dic/naist-jdic ]; \ then mkdir -p /etc/mecab/dic/naist-jdic; \ fi mkdir: cannot create directory `/etc/mecab': Read-only file system NAIST-jdicがconfigureの--prefixを使わないでいつも $(DESTDIR)/etc/...を操作しようとしているからですね。 辞書の設定方法は https://gist.github.com/sugryo/6cc5547ca9accb0aa888#file-naist_jdic-txt-L25 To enable dictionary, rewrite /app/vendor/mecab/etc/mecabrc as "dicdir = /app/vendor/mecab/lib/mecab/dic/naist-jdic" に↑のように出ている通りなので、前述のエラーになっている MeCabの辞書の設定の処理を使わないで自前で設定するのはどうで しょうか? 具体的にはこんな感じでいけるんじゃないでしょうか! * make installじゃなくてmake install-dataで辞書データだけ インストールする 参考: https://github.com/groonga/groonga/blob/master/packages/windows/Rakefile#L161 * ビルドスクリプトの中でmecabrcのdicdirを書き換える 参考: https://github.com/groonga/groonga/blob/master/packages/windows/Rakefile#L171-L174 -- 須藤 功平 <kou****@clear*****> 株式会社クリアコード <http://www.clear-code.com/> Groongaベースの全文検索システムを総合サポート: http://groonga.org/ja/support/ パッチ採用 - プログラミングが楽しい人向けの採用プロセス: http://www.clear-code.com/recruitment/ コードリーダー育成支援 - 自然とリーダブルコードを書くチームへ: http://www.clear-code.com/services/code-reader/