Ruby 2.0.0 충돌(iconv가 더 이상 존재하지 않음)
5254 단어 piston
묘사
다음은 단서입니다./Users/jyrkililja/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- iconv (LoadError)
from /Users/jyrkililja/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/jyrkililja/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-2.3.18/lib/active_support/inflector.rb:3:in `<top (required)>'
from /Users/jyrkililja/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/jyrkililja/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/jyrkililja/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-2.3.18/lib/active_support/core_ext/integer/inflections.rb:1:in `<top (required)>'
from /Users/jyrkililja/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/jyrkililja/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/jyrkililja/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-2.3.18/lib/active_support/core_ext/integer.rb:2:in `<top (required)>'
from /Users/jyrkililja/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/jyrkililja/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/jyrkililja/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-2.3.18/lib/active_support/core_ext.rb:8:in `block in <top (required)>'
from /Users/jyrkililja/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-2.3.18/lib/active_support/core_ext.rb:8:in `each'
from /Users/jyrkililja/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-2.3.18/lib/active_support/core_ext.rb:8:in `<top (required)>'
from /Users/jyrkililja/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/jyrkililja/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/jyrkililja/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-2.3.18/lib/active_support.rb:56:in `<top (required)>'
from /Users/jyrkililja/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/jyrkililja/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/jyrkililja/.rvm/gems/ruby-2.0.0-p0/gems/piston-2.0.10/lib/piston/cli.rb:2:in `<top (required)>'
from /Users/jyrkililja/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/jyrkililja/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/jyrkililja/.rvm/gems/ruby-2.0.0-p0/gems/piston-2.0.10/bin/piston:5:in `<top (required)>'
from /Users/jyrkililja/.rvm/gems/ruby-2.0.0-p0/bin/piston:23:in `load'
from /Users/jyrkililja/.rvm/gems/ruby-2.0.0-p0/bin/piston:23:in `<main>'
from /Users/jyrkililja/.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/jyrkililja/.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `<main>'
http://www.ruby-lang.org/en/news/2013/02/24/ruby-2-0-0-p0-is-released/말하기:Iconv was removed, which had already been deprecated when M17N was introduced in ruby 1.9. Use String#encode, etc. instead.
너는 이것이 얼마나 많은 일을 해야 하는지, 언제 해결해야 하는지 아니?
토론 #1
gem "iconv",:platform=>:mri 20을gem 파일에 추가할 수 있습니다.토론 #2
@FelixBunemanngem install iconv --platform=mri_20
은 Windows에서 작동하지 않습니다.C:\>ruby -v
ruby 2.1.5p273 (2014-11-13 revision 48405) [i386-mingw32]
토론 #셋
@alexandrembmiconv 라이브러리를 설치하지 않으면 의심스럽습니다.iconv가 win32에서 사용할 수 있는지 모르겠습니다.많은 번거로움을 줄이려면 linux나mac os x토론 #4
로 전환할 수 있습니다C:\> cd C:\DevKit
C:\> msys.bat
$ wget http://packages.openknapsack.org/libiconv/libiconv-1.14-x86-windows.tar.lzma
$ 7z x libiconv-1.14-x86-windows.tar.lzma
$ 7z x -olibiconv libiconv-1.14-x86-windows.tar
$ rm libiconv-1.14-x86-windows.tar*
$ cd /c/dev/libiconv
$ gem install iconv --platform=ruby -- --with-iconv-dir=/c/dev/libiconv
나는 다음을 수행합니다.C:\>iconv --version
iconv (GNU libiconv 1.11)
Copyright (C) 2000-2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Bruno Haible.
@Felix Bunemann, GNU/Linux를 사용하지만, 이식하기 편리하도록 루비 온 윈도우즈를 시도하고 싶습니다.토론 #5
참고로 플랫폼 힌트는 bundler에만 적용되며 gm install에 전달할 필요가 없습니다.루비 2.1에서는 mri 20이 아닌 mri 21을 사용해야 할 수도 있습니다.Reference
이 문제에 관하여(Ruby 2.0.0 충돌(iconv가 더 이상 존재하지 않음)), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://github.com/francois/piston/issues/11텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)