gpt4 book ai didi

heroku - 如何在 Heroku 上安装 charlock_holmes 依赖项 libicu-dev

转载 作者:行者123 更新时间:2023-12-03 00:39:15 24 4
gpt4 key购买 nike

我正在使用 ruby​​ gem charlock_holmes在 Rails 4 应用程序中检测我正在解析的 CSV 的字符编码,以便 CSV.foreach 不会引发错误。

但是,当我尝试推送到heroku(在 Gemfile 中使用 gem 'charlock_holmes')时,我收到以下错误:

Installing charlock_holmes (0.6.9.4)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/tmp/build_e741f6ed-a860-47bf-8c0d-1b678fa0ebeb/vendor/ruby-2.0.0/bin/ruby extconf.rb
checking for main() in -licui18n... no
checking for main() in -licui18n... no


***************************************************************************************
*********** icu required (brew install icu4c or apt-get install libicu-dev) ***********
***************************************************************************************
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/tmp/build_e741f6ed-a860-47bf-8c0d-1b678fa0ebeb/vendor/ruby-2.0.0/bin/ruby
--with-icu-dir
--without-icu-dir
--with-icu-include
--without-icu-include=${icu-dir}/include
--with-icu-lib
--without-icu-lib=${icu-dir}/
--with-icui18nlib
--without-icui18nlib
--with-icui18nlib
--without-icui18nlib


Gem files will remain installed in /tmp/build_e741f6ed-a860-47bf-8c0d-1b678fa0ebeb/vendor/bundle/ruby/2.0.0/gems/charlock_holmes-0.6.9.4 for inspection.
Results logged to /tmp/build_e741f6ed-a860-47bf-8c0d-1b678fa0ebeb/vendor/bundle/ruby/2.0.0/gems/charlock_holmes-0.6.9.4/ext/charlock_holmes/gem_make.out
An error occurred while installing charlock_holmes (0.6.9.4), and Bundler cannot
continue.
Make sure that `gem install charlock_holmes -v '0.6.9.4'` succeeds before
bundling.

如何在 Heroku 上安装 libicu-dev

最佳答案

尝试使用gem“charlock_holmes_bundle_icu”,“~> 0.6.9.2”More info.

关于heroku - 如何在 Heroku 上安装 charlock_holmes 依赖项 libicu-dev,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18926574/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com