2011-10-20 11 views
16
➜ expertiza git:(master) ✗ ruby -v 
    ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-darwin11.1.0] 
    ➜ expertiza git:(master) ✗ rails -v 
    Rails 2.3.14 
    ➜ expertiza git:(master) ✗ script/server 
/Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/activesupport-2.3.14/lib/active_support/inflector.rb:3:in `require': no such file to load -- iconv (LoadError) 
    from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/activesupport-2.3.14/lib/active_support/inflector.rb:3 
    from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/activesupport-2.3.14/lib/active_support/core_ext/integer/inflections.rb:1:in `require' 
    from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/activesupport-2.3.14/lib/active_support/core_ext/integer/inflections.rb:1 
    from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/activesupport-2.3.14/lib/active_support/core_ext/integer.rb:2:in `require' 
    from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/activesupport-2.3.14/lib/active_support/core_ext/integer.rb:2 
    from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/activesupport-2.3.14/lib/active_support/core_ext.rb:8:in `require' 
    from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/activesupport-2.3.14/lib/active_support/core_ext.rb:8 
    from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/activesupport-2.3.14/lib/active_support/core_ext.rb:8:in `each' 
    from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/activesupport-2.3.14/lib/active_support/core_ext.rb:8 
    from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/activesupport-2.3.14/lib/active_support.rb:56:in `require' 
    from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/activesupport-2.3.14/lib/active_support.rb:56 
    from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/rails-2.3.14/lib/commands/server.rb:1:in `require' 
    from /Users/HPV/.rvm/gems/ruby-1.8.7-p352/gems/rails-2.3.14/lib/commands/server.rb:1 
    from script/server:3:in `require' 

私もWhy does installing Nokogiri on Mac OS fail with libiconv is missing?を試してみました'を必要としません `で:ロードするそのようなファイルを - のiconv(とLoadError)

rvm pkg install readline 
rvm pkg install iconv 
rvm install 1.8.7 
rvm use 1.8.7 

をインストールしようとしています。

何も機能しません。助けてください!

ありがとうございます!代わりにRVMのrbenvを使用してそれらのために

答えて

31

iconvは存在しませんがiconvは私の生産環境にインストールされています。

[email protected]/current# iconv --version 
iconv (Ubuntu EGLIBC 2.15-0ubuntu10.4) 2.15 
Copyright (C) 2012 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 Ulrich Drepper. 

すると、それを解決するには、あなたのGemfileに以下を追加:

gem "iconv", "~> 1.0.3" 

その後bundle installを実行します。

注:しばらくの間、iconvは廃止されました。それは(組み込み)に置き換えられますString#encode
ここをクリックしてください:https://bbs.archlinux.org/viewtopic.php?id=160369

+2

Ruby 2.0.0で私のために働いたiconv宝石を指定してください。ありがとう! –

+0

これは永遠に取った再コンパイルよりもはるかに優れています。 – Kevin

+0

素晴らしい作品、ありがとうございます –

6

$ which iconv 
$ /usr/local/bin/iconv 

はその後ルビーに

$ CONFIGURE_OPTS="--with-iconv-dir=/usr/local" rbenv install 1.8.7-p358 

幸運

(注意点として、このエラーがいる再インストールするのiconvのディレクトリの場所を使用しますRuby 1.8.7-p3xxで報告されています)

関連する問題