Ruby环境安装过程

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
$ sudo su
Password:
sh-3.2# rvm -v
Can't find rvm install!
sh-3.2# curl -L get.rvm.io | bash -s stable
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   184  100   184    0     0    358      0 --:--:-- --:--:-- --:--:--  1082
100 13409  100 13409    0     0   7791      0  0:00:01  0:00:01 --:--:-- 51972
Downloading RVM from wayneeseguin branch stable
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   124  100   124    0     0    116      0  0:00:01  0:00:01 --:--:--   148
100 3263k  100 3263k    0     0   173k      0  0:00:18  0:00:18 --:--:--  362k

Installing RVM to /usr/local/rvm/
    Group 'rvm' already exists
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
/usr/local/rvm/src/rvm/scripts/functions/installer: line 990: : No such file or directory

 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 run 'rvm requirements' or read 'rvm notes'

Installation of RVM in /usr/local/rvm/ is almost complete:

  * First you need to add all users that will be using rvm to 'rvm' group,
    and logout - login again, anyone using rvm will be operating with `umask u=rwx,g=rwx,o=rx`.

  * To start using RVM you need to run `source /etc/profile.d/rvm.sh`
    in all your open shell windows, in rare cases you need to reopen all shell windows.

 xujingbao,

   Thank you for using RVM!
   I sincerely hope that RVM helps to make your life easier and
   more enjoyable!!!

 ~Wayne

sh-3.2# rvm -v

rvm 1.19.6 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]

sh-3.2# [ -r ~/.profile ] && source ~/.profile
sh-3.2# rvm requirements
Installing requirements for osx, might require sudo password.
Skipping `brew update` make sure your formulas are up to date.
RVM autolibs is now configured with mode '2' => 'check and stop if missing',
please run `rvm autolibs enable` to let RVM do its job or run and read `rvm autolibs [help]`
or visit https://rvm.io/rvm/autolibs for more information.
Missing required packages: libtool, libxml2, libxslt, libksba, openssl, sqlite.
RVM autolibs is now configured with mode '2' => 'check and stop if missing',
please run `rvm autolibs enable` to let RVM do its job or run and read `rvm autolibs [help]`
or visit https://rvm.io/rvm/autolibs for more information.
There were package installation errors, make sure to read the log.
Check Homebrew requirements https://github.com/mxcl/homebrew/wiki/Installation
sh-3.2# rvm autolibs enable
sh-3.2# rvm requirements
Installing requirements for osx, might require sudo password.
Updated Homebrew from acf99493 to b43d20d2.
==> Updated Formulae
antiword
Installing required packages: libtool, libxml2, libxslt, libksba, openssl, sqlite..............................................................................................................
Updating certificates in '/usr/local/etc/openssl/cert.pem'.
sh-3.2# rvm list

rvm rubies


 No rvm rubies installed yet. Try 'rvm help install'.

sh-3.2#
sh-3.2# rvm list

rvm rubies


 No rvm rubies installed yet. Try 'rvm help install'.

sh-3.2# rvm install 2.0.0
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-2.0.0-p0.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing requirements for osx, might require sudo password.
Already up-to-date.
Certificates in '/usr/local/etc/openssl/cert.pem' already are up to date.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-2.0.0-p0, this may take a while depending on your cpu(s)...
ruby-2.0.0-p0 - #downloading ruby-2.0.0-p0, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10.3M  100 10.3M    0     0   150k      0  0:01:10  0:01:10 --:--:--  218k
ruby-2.0.0-p0 - #extracting ruby-2.0.0-p0 to /usr/local/rvm/src/ruby-2.0.0-p0
ruby-2.0.0-p0 - #extracted to /usr/local/rvm/src/ruby-2.0.0-p0
ruby-2.0.0-p0 - #configuring......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
ruby-2.0.0-p0 - #compiling......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
ruby-2.0.0-p0 - #installing .................................................................................................................................
Retrieving rubygems-2.0.3
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  326k  100  326k    0     0  93417      0  0:00:03  0:00:03 --:--:--  107k
Extracting rubygems-2.0.3 ...
Removing old Rubygems files...
Installing rubygems-2.0.3 for ruby-2.0.0-p0...........................................................................................................................................................................................................................................................................................................................................................................................................
Installation of rubygems completed successfully.
Saving wrappers to '/usr/local/rvm/wrappers/ruby-2.0.0-p0'........

ruby-2.0.0-p0 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-2.0.0-p0 - #importing default gemsets, this may take time.......................
Install of ruby-2.0.0-p0 - #complete

$echo $PATH
/usr/local/Cellar/ruby/2.0.0-p0/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/Users/xujingbao/.rvm/bin:/Applications/android-sdk-macosx/platform-tools/
$ ruby -v
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.3.0]