Error while installing iconv on windows by ruby2.0.0

佐手、 提交于 2019-12-01 17:36:13

I had this problem this evening (Windows 7, Ruby 1.9.3). The solution in my case was as follows:

  1. Install the "Complete package, except sources" from http://gnuwin32.sourceforge.net/packages/libiconv.htm

  2. Run gem install iconv -v '1.0.4' -- --with-iconv-dir=/path/to/GnuWin32

If that doesn't work, I also followed the instructions here first: http://donpepeto.com/2014/09/20/fixing-c-libraries-on-your-rubyrails-install-on-windows/ (Copying the contents of /bin, /include and /lib from the GnuWin32 install) They didn't work on their own, but once I'd run the setup, I was able to install the gem, so maybe that helped. I also got an error about a missing .gitignore, but I ignored that, ran gem install... again and it worked.

I was facing same issue on windows 10. Thanks @Emma Burrows and @ZeWaren. Following worked for me,

  1. Install libiconv; http://gnuwin32.sourceforge.net/packages/libiconv.htm
  2. Copy files from /include and /lib into /bin folder, for me C:\Program Files (x86)\GnuWin32\bin
  3. Set PATH (Environment Variable) to C:\Program Files (x86)\GnuWin32\bin
  4. Exceute (Tricky one): gem install iconv -- --with-iconv-dir="C:\Program Files (x86)\GnuWin32\" and during gem install quickly past files from /bin into C:\RailsInstaller\Ruby2.2.0\lib\ruby\gems\2.2.0\gems\iconv-1.0.4\ext\iconv

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!