开发者

About Ruby Version Manager Installation

开发者 https://www.devze.com 2023-01-06 08:35 出处:网络
I was trying to install RVM:Ruby Version Manager from: http://rvm.beginrescueend.com/rvm/install/ I opened up my terminal in my mac os version 10.5.8 and use the command line

I was trying to install RVM:Ruby Version Manager from:

http://rvm.beginrescueend.com/rvm/install/

I opened up my terminal in my mac os version 10.5.8 and use the command line

bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )

then I got the message,

"You must now finish the install manually: 1) Place the folowing line at the end of your shell's loading files(.bashrc or .bash_profile for bash and .zshrc for zsh), after all path/variable settings: [[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm Please note that this must only occur once - so, you only need to add it the first time you install rvm. 2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly). This means that if you see '[ -z ] && return' then you must change this line to: if [[ ! -z ]] ; then ... original content that was below the && return line ... fi # <= be sure to close the if. #EOF .bashrc Be absolutely sure to REMOVE the '&& return'. If you wish to DRY up your config you can 'source ~/.bashrc' at the bottom of your .bash_profile. placing all non-interactive items in the .bashrc, including the 'source' line above 3) Then CLOSE THIS SHELL and open a new one in order to use rvm.

Installation of RVM to /Users/Home/.rvm/ is complete.

kapplej-4:~ Home$ #!/usr/bin/env bash
kapplej-4:~ Home$ 
kapplej-4:~ Home$ # Install git
kapplej-4:~ Home$开发者_如何学Go mkdir -p $HOME/.rvm/src && cd $HOME/.rvm/src && version=1.6.5.3
kapplej-4:src Home$ curl -O http://kernel.org/pub/software/scm/git/git-$version.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 2645k  100 2645k    0     0   953k      0  0:00:02  0:00:02 --:--:-- 1060k
kapplej-4:src Home$ cd git-$version && ./configure --prefix=/usr/local && make && sudo make install
-bash: cd: git-1.6.5.3: No such file or directory"

I have no idea how to complete installation manually, I am a complete newbie so can someone please give me a step by step instruction on how to do this. For eg, where do I go to add those lines to the shell's loading files?

Thanks,


Not sure why you're installing git through rvm, but my guess is that you didn't extract the tar.gz file before trying to access the directory. Before cd'ing into the git directory you'll need to do

tar -zxf git-$version.tar.gz

To complete the install you need to add the line:

[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm

to the end of your .bashrc file (assuming you're using bash which you can determine with echo $SHELL.)

You also need to verify that your bash script doesn't return (the -z return bit in the RVM message. If it does return do what RVM says during the install.)

Once the line is added exit your shell and open a new one. You should then be able to do rvm info to see rvm info and rvm to get more information on RVM.


If Git is already installed, the up-to-date command to install RVM is curl -L get.rvm.io | bash -s stable.

0

精彩评论

暂无评论...
验证码 换一张
取 消