2012-04-21 43 views
3

我剛剛安裝了Ubuntu 11.10和RVM 1.12.4(穩定):將Ruby與RVM 1.12

[email protected]:~$ curl -L get.rvm.io | bash -s stable 
    % Total % Received % Xferd Average Speed Time Time  Time Current 
           Dload Upload Total Spent Left Speed 
100 185 100 185 0  0 223  0 --:--:-- --:--:-- --:--:-- 968 
100 8545 100 8545 0  0 5888  0 0:00:01 0:00:01 --:--:-- 5888 
Downloading RVM from wayneeseguin branch stable 
    % Total % Received % Xferd Average Speed Time Time  Time Current 
           Dload Upload Total Spent Left Speed 
100 125 100 125 0  0 210  0 --:--:-- --:--:-- --:--:-- 272 
100 992k 100 992k 0  0 293k  0 0:00:03 0:00:03 --:--:-- 488k 

Installing RVM to /home/doug/.rvm/ 
    Adding rvm PATH line to /home/doug/.bashrc /home/doug/.zshrc. 
    Adding rvm loading line to /home/doug/.bash_login /home/doug/.zlogin. 

# RVM: Shell scripts enabling management of multiple ruby environments. 
# RTFM: https://rvm.io/ 
# HELP: http://webchat.freenode.net/?channels=rvm (#rvm on irc.freenode.net) 
# Cheatsheet: http://cheat.errtheblog.com/s/rvm/ 
# Screencast: http://screencasts.org/episodes/how-to-use-rvm 

# In case of any issues read output of 'rvm requirements' and/or 'rvm notes' 

Installation of RVM in /home/doug/.rvm/ is almost complete: 

    * To start using RVM you need to run `source /home/doug/.rvm/scripts/rvm` 
    in all your open shell windows, in rare cases you need to reopen all shell windows. 

# doug, 
# 
# Thank you for using RVM! 
# I sincerely hope that RVM helps to make your life easier and more enjoyable!!! 
# 
# ~Wayne 

在那之後,我安裝了Ruby 1.9.3。而爲了使用它,我只是這樣做:

$ rvm use 1.9.3 

RVM is not a function, selecting rubies with 'rvm use ...' will not work. 
Please visit https://rvm.io/integration/gnome-terminal/ for a solution. 

顯然,這個新版本的RVM需要一些配置。但我不明白該怎麼辦閱讀本頁:https://rvm.io/integration/gnome-terminal/

你知道我應該怎麼做嗎?謝謝。

+0

我只是使用以下步驟(從http://askubuntu.com/questions/40287/etc-profile-not-being-sourced)解決了我的煩惱: *啓動GNOME終端; *轉到編輯 - >配置文件首選項 - >標題和命令; *啓用「運行命令作爲登錄shell」; *重新啓動gnome終端。 我還在'〜/ .profile'文件中添加了'export rvm_cd_complete_flag = 1'。 一切似乎沒問題,是〜 – Doug 2012-04-21 16:56:44

回答

9

您需要將此行添加到您.zshrc

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function 

然後重新裝入:

source ~/.zshrc 
+0

或他的zshrc文件:) – Sean 2012-04-21 15:14:00

+0

糟糕,我的壞!沒有看到.zshrc。 – robbrit 2012-04-21 15:18:54

+1

您不應該將此添加到zshrc中,這可能會導致錯誤和隱藏錯誤,它可能遲早會咬你,請查看https://rvm.io/support/faq/#shell_login瞭解一些細節。 – mpapis 2012-04-24 10:53:42

0

這篇文章幫助我。你可以試試這個:

RVM似乎是在一個函數和非函數之間進行振盪。這是一個 功能,然後:

scytale的@杜爾:〜$ @ scytale的DUR:〜$ RVM系統

RVM不是一個函數,選擇紅寶石與 'RVM使用......' 不會 工作。 scytale @ dur:〜$ scytale @ dur:〜$ type rvm |頭-1 rvm被散列 (/home/scytale/.rvm/bin/rvm)scytale @ dur:〜$ scytale @ dur:〜$源 /home/scytale/.rvm/scripts/rvm scytale @ dur:〜 $ scytale @ dur:〜$ type rvm |頭-1 RVM是scytale的@ DUR功能:〜$ @ scytale的DUR:〜$ RVM系統 scytale的@杜爾:〜$

現在,所有我能想到的是,我是想喜歡的東西:

$腳本foo.txt的... somethinng與RVM ... $退出

,然後它似乎像RVM爆發,雖然這是罰款的 腳本。我不明白這怎麼可能影響任何影響這個的bashrc 等文件。沒有?