2012-01-01 39 views
0

當我嘗試啓動IRB,我得到的錯誤ERROR: Missing RVM environment file: '/home/tom/.rvm/environments/ruby-1.9.2-p180'運行IRB時丟失(或隱藏)RVM環境

有趣的是,我的主目錄是托馬斯,不是湯姆 - RVM使用我的主目錄從之前的名字我不得不重新安裝Ubuntu和一個突發奇想改名我自己。沒有檔案/home/thomas/.rvm/environments/ruby-1.9.2-p180。我嘗試使用這些命令(http://www.mkoby.com/2011/06/03/completely-removing-rvm/)卸載RVM,但錯誤依然存在。我不認爲我的.irbrc文件有腥意:

IRB.conf[:PROMPT][:CUSTOM] = { 
    :PROMPT_I => "%3n :: ", 
    :PROMPT_S => "%3n %l>> ", 
    :PROMPT_C => "%3n .. ", 
    :PROMPT_N => "%3n .. ", 
    :RETURN => " => %s\n" 
} 
IRB.conf[:PROMPT_MODE] = :CUSTOM 
IRB.conf[:AUTO_INDENT] = true 

# Stuff to load 
require 'pp' 

require 'irb/completion' 
require 'irb/ext/save-history' 
IRB.conf[:SAVE_HISTORY] = 100 
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-history" 

接下來我可以嘗試什麼?

回答

0

檢查以下

echo $HOME -- should point to the correct home directory 

which rvm -- should pick rvm from the correct home directory 

which irb -- should pick irb from the correct location 

gem env  -- check if the gem paths are correctly set. 

順便說一句都運行良好,您的RVM命令。 試試做

rvm list 
rvm use 1.9.2 
+0

那麼這很有趣。前三個命令看起來不錯,給/ home/thomas和/ home/thomas/bin/irb和/ home/thomas/bin/rvm。 'gem env'命令給出了熟悉的錯誤,'ERROR:缺少RVM環境文件:'/ home/tom/.rvm/environments/ruby​​-1.9.2-p180'。這兩個rvm命令導致無限循環'/ home/thomas/bin/rvm:第49行:/home/thomas/.rvm/scripts/rvm:沒有這樣的文件或目錄' – tom 2012-01-05 18:27:27