ruby on rails でのアプリケーションを製作中です。
MeCab形態素分析ツールを使っており、ローカルでは問題なく動作しているのですが、herokuへのデプロイの際にエラーが発生してしまいます。
≪エラー内容≫
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only fo r x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bun dle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`. Fetching gem metadata from https://rubygems.org/............ Fetching gem metadata from https://rubygems.org/. Resolving dependencies... Using rake 12.3.3 Using concurrent-ruby 1.1.5 Using i18n 1.6.0 Using minitest 5.12.2 Using thread_safe 0.3.6 Using tzinfo 1.2.5 Using activesupport 5.1.7 Using builder 3.2.3 Using erubi 1.9.0 Using mini_portile2 2.4.0 Using nokogiri 1.10.4 Using rails-dom-testing 2.0.3 Using crass 1.0.4 Using loofah 2.3.0 Using rails-html-sanitizer 1.2.0 Using actionview 5.1.7 Using rack 2.0.7 Using rack-test 1.1.0 Using actionpack 5.1.7 Using nio4r 2.5.2 Using websocket-extensions 0.1.4 Using websocket-driver 0.6.5 Using actioncable 5.1.7 Using globalid 0.4.2 Using activejob 5.1.7 Using mini_mime 1.0.2 Using mail 2.7.1 Using actionmailer 5.1.7 Using activemodel 5.1.7 Using arel 8.0.0 Using activerecord 5.1.7 Using public_suffix 4.0.1 Using addressable 2.7.0 Using bindex 0.8.1 Using bundler 1.17.2 Using byebug 11.0.1 Using xpath 3.2.0 Using capybara 2.18.0 Using childprocess 2.0.0 Using coffee-script-source 1.12.2 Using execjs 2.7.0 Using coffee-script 2.4.1 Using method_source 0.9.2 Using thor 0.20.3 Using railties 5.1.7 Using coffee-rails 4.2.2 Using ffi 1.11.1 Using jbuilder 2.9.1 Using rb-fsevent 0.10.3 Using rb-inotify 0.10.0 Using ruby_dep 1.5.0 Using listen 3.1.5 Using natto 1.1.2 Using puma 3.12.1 Using sprockets 3.7.2 Using sprockets-rails 3.2.1 Using rails 5.1.7 Using rubyzip 1.3.0 Using sass-listen 4.0.0 Using sass 3.7.4 Using tilt 2.0.10 Using sass-rails 5.0.7 Using selenium-webdriver 3.142.4 Using spring 2.1.0 Using spring-watcher-listen 2.0.1 Using sqlite3 1.3.13 (was 1.4.1) Using turbolinks-source 5.2.0 Using turbolinks 5.2.1 Using uglifier 4.2.0 Using web-console 3.7.0 Bundle complete! 18 Gemfile dependencies, 70 gems now installed. Gems in the group production were not installed. Use `bundle info [gemname]` to see where a bundled gem is installed. [vagrant@localhost test_app]$ git push heroku master Counting objects: 92, done. Compressing objects: 100% (79/79), done. Writing objects: 100% (92/92), 21.69 KiB, done. Total 92 (delta 2), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: -----> Ruby app detected remote: -----> Compiling Ruby/Rack remote: ! remote: ! An error occurred while installing Ruby ruby-2.0.0 remote: ! For supported Ruby versions see https://devcenter.heroku.com/arti cles/ruby-support#supported-runtimes remote: ! Note: Only the most recent version of Ruby 2.1 is supported on Ce dar-14 remote: ! Command: 'set -o pipefail; curl --fail --retry 3 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-bui ldpack-ruby/heroku-18/ruby-2.0.0.tgz -s -o - | tar zxf - ' failed unexpectedly: remote: ! remote: ! gzip: stdin: unexpected end of file remote: ! tar: Child returned status 1 remote: ! tar: Error is not recoverable: exiting now remote: ! remote: ! Push rejected, failed to compile Ruby app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to morning-hamlet-96003. remote: [vagrant@localhost test_app]$ git add -A [vagrant@localhost test_app]$ git commit -m "aaa" [master 923fa0f] aaa Committer: vagrant <vagrant@localhost.localdomain> Your name and email address were configured automatically based on your username and hostname. Please check that they are accurate. You can suppress this message by setting them explicitly: git config --global user.name "Your Name" git config --global user.email you@example.com If the identity used for this commit is wrong, you can fix it with: git commit --amend --author='Your Name <you@example.com>' 2 files changed, 11 insertions(+), 4 deletions(-) [vagrant@localhost test_app]$ git push heroku master Counting objects: 96, done. Compressing objects: 100% (83/83), done. Writing objects: 100% (96/96), 22.04 KiB, done. Total 96 (delta 5), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: -----> Ruby app detected remote: -----> Compiling Ruby/Rack remote: ! remote: ! An error occurred while installing Ruby ruby-2.0.0 remote: ! For supported Ruby versions see https://devcenter.heroku.com/arti cles/ruby-support#supported-runtimes remote: ! Note: Only the most recent version of Ruby 2.1 is supported on Ce dar-14 remote: ! Command: 'set -o pipefail; curl --fail --retry 3 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-bui ldpack-ruby/heroku-18/ruby-2.0.0.tgz -s -o - | tar zxf - ' failed unexpectedly: remote: ! remote: ! gzip: stdin: unexpected end of file remote: ! tar: Child returned status 1 remote: ! tar: Error is not recoverable: exiting now remote: ! remote: ! Push rejected, failed to compile Ruby app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to morning-hamlet-96003. remote:
一度別のアプリケーションを立ち上げてとりあえずgem 'natto'を入れて
heroku config:set BUILDPACK_URL=https://github.com/diasks2/heroku-buildpack-mecab.git heroku config:add LD_LIBRARY_PATH=app/.linuxbrew/lib heroku config:set MECAB_PATH=app/.linuxbrew/lib/libmecab.so.2
をコマンドしたのち
git push heroku master
したのですが、やはり同様のエラーが発生してしまいます。
どのように対応したらよいのかわからず、いろいろ調べつつ1週間ほどたってしまいましたので質問を投稿しました。
MeCab Nattoを使用したアプリケーションのデプロイに成功した方など、ぜひご教示いただけたらと思います。
回答1件
あなたの回答
tips
プレビュー