2011-10-20 17 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' 

Ho provato ad installarein `require ': Nessun file da caricare - iconv (LoadError)

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

anche provato Why does installing Nokogiri on Mac OS fail with libiconv is missing?.

Niente funziona. Per favore aiuto!

Grazie!

risposta

31

Mostra t non esiste l'iconv ma l'iconv è stato installato nel mio ambiente di produzione.

[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. 

per risolverlo, aggiungere questo nel vostro Gemfile:

gem "iconv", "~> 1.0.3" 

Quindi eseguire bundle install.

Nota: iconv è stato deprecato per un po '. È sostituito da (built-in) String # encode
Vedi qui: https://bbs.archlinux.org/viewtopic.php?id=160369

+2

Specifica la gemma iconv ha funzionato per me su Ruby 2.0.0. Grazie! –

+0

Molto meglio che ricompilare, che è durato per sempre :) – Kevin

+0

Funziona alla grande, grazie –

6

Per coloro che utilizzano rbenv invece di RVM

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

quindi utilizzare il percorso di directory di iconv per reinstallare rubino

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

Buona fortuna

(Come nota a margine, questo errore è stato segnalato accadere in Ruby 1.8.7-p3xx)

Problemi correlati