2012-10-02 36 views
1

每當我試圖訪問一個rubygem,我發現了一個錯誤。例如。與rails -v我得到以下錯誤:錯誤在訪問所有rubygem

/Users/sayanee/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find railties (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4] (Gem::LoadError) 
    from /Users/sayanee/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec' 
    from /Users/sayanee/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in `gem' 
    from /Users/sayanee/.rvm/gems/ruby-1.9.3-p125/bin/rails:18:in `<main>' 
    from /Users/sayanee/.rvm/gems/[email protected]/bin/ruby_noexec_wrapper:14:in `eval' 
    from /Users/sayanee/.rvm/gems/[email protected]/bin/ruby_noexec_wrapper:14:in `<main>' 

我在MAC OSX獅子具有以下配置:

ruby -v 
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.3.0] 

rvm -v 
rvm 1.16.6 (stable) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/] 
+1

你是怎麼安裝'rails'? – three

回答

1

想通了什麼是錯的感謝this stackoverflow question

我改變了對iTerm2和安裝oh my zsh。所以,我包括在我的文件~/.zshrc以下解決所有的rubygem錯誤。

export LC_CTYPE="utf-8" 
+0

爲Ubuntu使用:''出口LC_CTYPE = 「的en_US.UTF-8」''。這修復了導軌在我的系統上產生錯誤。 – svandragt