1
Ethan25 OP ==> Downloading ftp://ftp.cwru.edu/pub/bash/readline-6.1.tar.gz
File already downloaded and cached to /Users/ez6490/Library/Caches/Homebrew ==> Downloading patches ######################################################################## 100.0% ==> Patching patching file complete.c patching file patchlevel patching file readline.h patching file patchlevel ==> ./configure --prefix=/usr/local/Cellar/readline/6.1 --mandir=/usr/local/Cell ==> make install ==> Caveats This formula is keg-only, so it is not symlinked into Homebrew's prefix. The formula provides the following rationale: OS X provides the BSD Readline library. In order to prevent conflicts when programs look for libreadline we are defaulting this GNU Readline installation to keg-only. |
2
Ethan25 OP Generally there are no consequences of this for you, however if you build
your own software and it requires this formula, you may want to run this command to link it into the Homebrew prefix: $ brew link readline ==> Summary /usr/local/Cellar/readline/6.1: 32 files, 2.0M, built in 30 seconds ==> Downloading http://pyyaml.org/download/libyaml/yaml-0.1.3.tar.gz ######################################################################## 100.0% ==> ./configure --prefix=/usr/local/Cellar/libyaml/0.1.3 ==> make install /usr/local/Cellar/libyaml/0.1.3: 5 files, 392K, built in 16 seconds ==> Downloading http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p136.tar.bz2 ######################################################################## 100.0% ==> ./configure --prefix=/usr/local/Cellar/ruby/1.9.2-p136 --with-readline-dir=/ ==> make ==> make install ==> Caveats Consider using RVM or Cinderella to manage Ruby environments: * RVM: http://rvm.beginrescueend.com/ * Cinderella: http://www.atmos.org/cinderella/ NOTE: By default, gem installed binaries will be placed into: /usr/local/Cellar/ruby/1.9.2-p136/bin You may want to add this to your PATH. ==> Summary /usr/local/Cellar/ruby/1.9.2-p136: 10570 files, 60M, built in 4.1 minutes $ ruby -v ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0] |
3
Ethan25 OP 后来我尝试了一下rvm 但是安装完 我就崩溃了 代码如下
$ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head ) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 109 986 109 986 0 0 1626 0 --:--:-- --:--:-- --:--:-- 3851 Cloning into rvm... remote: Counting objects: 16558, done. remote: Compressing objects: 100% (4467/4467), done. remote: Total 16558 (delta 11155), reused 15843 (delta 10649) Receiving objects: 100% (16558/16558), 2.94 MiB | 8 KiB/s, done. Resolving deltas: 100% (11155/11155), done. RVM: Shell scripts enabling management of multiple ruby environments. RTFM: http://rvm.beginrescueend.com/ HELP: http://webchat.freenode.net/?channels=rvm (#rvm on irc.freenode.net) Installing RVM to /Users/ez6490/.rvm/ Correct permissions for base binaries in /Users/ez6490/.rvm/bin... Copying manpages into place. Notes for Darwin ( Mac OS X ) For Snow Leopard be sure to have Xcode Tools Version 3.2.1 (1613) or later You should download the latest Xcode tools from developer.apple.com. (This is since the dvd install for Snow Leopard contained bugs). If you intend on installing MacRuby you must install LLVM first. If you intend on installing JRuby you must install the JDK. If you intend on installing IronRuby you must install Mono (version 2.6 or greater is recommended). To seamlessly abandon the Apple-installed system ruby (ruby 1.8.7 patchlevel 174 for Snow Leopard): rvm install 1.8.7 # installs patch 302: closest supported version rvm system ; rvm gemset export system.gems ; rvm 1.8.7 ; rvm gemset import system # migrate your gems rvm --default 1.8.7 |
4
Ethan25 OP You must now complete the install by loading RVM in new shells.
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" # This loads RVM into a shell session. You only need to add this line the first time you install rvm. 2) Ensure that there is no 'return' from inside the ~/.bashrc file, otherwise rvm may be prevented from working properly. This means that if you see something like: '[ -z "$PS1" ] && return' then you change this line to: if [[ -n "$PS1" ]] ; then # ... original content that was below the '&& return' line ... fi # <= be sure to close the if at the end of the .bashrc. # This is a good place to source rvm v v v [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session. EOF - This marks the end of the .bashrc file 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 (non login) items in the .bashrc, including the 'source' line above and any environment settings. 3) CLOSE THIS SHELL and open a new one in order to use rvm. Installation of RVM to /Users/ez6490/.rvm/ is complete. |
5
Ethan25 OP ez6490,
Thank you very much for using RVM! I sincerely hope that RVM helps to make your work both easier and more enjoyable. If you have any questions, issues and/or ideas for improvement please join#rvm on irc.freenode.net and let me know, note you must register (http://bit.ly/5mGjlm) and identify (/msg nickserv <nick> <pass>) to talk, this prevents spambots from ruining our day. My irc nickname is 'wayneeseguin' and I hang out in #rvm typically ~09:00-17:00EDT and again from ~21:00EDT-~23:00EDT If I do not respond right away, please hang around after asking your question, I will respond as soon as I am back. It is best to talk in #rvm itself as then other users can help out should I be offline. Be sure to get head often as rvm development happens fast, you can do this by running 'rvm get head' followed by 'rvm reload' or opening a new shell w⦿‿⦿t ~ Wayne $ rvm notes -bash: rvm: command not found 我刚刚开始接触编程 比较小白 所以希望大家多帮帮忙 在这里先多谢了 。 |
6
lainuo 2011-01-05 10:36:50 +08:00
source一下, 或者新开一个shell看看.
|
7
ashchan 2011-01-05 11:17:30 +08:00
rvm是全宇宙最方便的ruby安装工具。你确定装完后把这行加入了.bash_login (或.bash_profile,看你的shell原先用的是什么)了吗:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" 加入后,source .bash_login或新开一个Terminal窗口。然后 rvm install 1.9.2 |
8
huacnlee 2011-01-05 12:01:22 +08:00
用 RVM 安装。非常方便
|
12
roamlog 2011-01-05 20:53:24 +08:00
完全不懂命令行吗?
|
15
Ethan25 OP |
16
n2n3 2011-01-07 07:39:20 +08:00
|
18
chouti 2011-01-19 18:35:03 +08:00
@Ethan25
假设你用的是 .bash_profile 那么在终端 sudo vim ~/.bash_profile 打开文件之后,把 [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" 加入到文件的末尾 按 Esc 键后输入 :wq 保存退出 然后再输入 source ~/.bash_profile 就可以了,再 rvm note 应该就没有问题了 |
19
bwlinux 2011-01-25 10:49:04 +08:00
如果不想升级ruby,只是想用ror 3。就是sudo gem update,就好了。
如果要想ruby 1。9。2,这个需要折腾下。 |
20
liluo 2011-08-26 17:14:31 +08:00
NOTE: By default, gem installed binaries will be placed into:
/usr/local/Cellar/ruby/1.9.2-p136/bin You may want to add this to your PATH. 根据这些提示,把 /usr/local/Cellar/ruby/1.9.2-p136/bin 加入到PATH,比如: export PATH=/usr/local/Cellar/ruby/1.9.2-p136/bin |
21
izon90 2011-10-09 22:06:29 +08:00
还是楼上的一行export PATH=/usr/local/Cellar/ruby/1.9.2-p136/bin解决问题了。
|
22
roamlog 2011-10-09 22:35:04 +08:00 via iPhone
推荐用 rvm
|
23
flyingkid 2011-10-15 11:40:57 +08:00
|
24
qiang1012 2012-02-18 12:50:30 +08:00
rvm --default 1.9.2
可以吗? |