【发布时间】:2011-08-21 04:23:47
【问题描述】:
我一直按照这个网站的教程在 Mac 上安装 Ruby on Rails:
http://ruby.railstutorial.org/
我安装了 rvm,但它不工作。教程说要输入这个命令:
~ $ [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
在我这样做之后,它似乎已经成功加载,因为它是这样说的:
~ DUFF$ rvm reload
RVM reloaded!
~ DUFF$ rvm notes
Notes for Darwin ( Mac OS X )
For Lion, Rubies should be built using gcc rather than llvm-gcc. Since
/usr/bin/gcc is now linked to /usr/bin/llvm-gcc-4.2, add the following to
your shell's start-up file: export CC=gcc-4.2
(The situation with LLVM and Ruby may improve. This is as of 07-23-2011.)
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
NOTE: For all installations, as of 1.7, RVM no longer autoloads .rvmrc files. In order to return this functionality, you MUST add 'export rvm_project_rvmrc=1' to your $HOME/.rvmrc file. This causes RVM to override 'cd' which, while toggleable even < 1.7, is currently defaulted to 'off'. This knob returns the previous behaviour to active which causes per-project .rvmrc files to be loaded once again.
示例:echo 'export rvm_project_rvmrc=1' >> $HOME/.rvmrc && rvm reload
所以我按照指示输入了这个:
type rvm | head -n1
它说:
-bash: type: rvm: not found
因此,经过长时间的介绍,我的问题是,您知道为什么在 rvm 类型似乎已安装后它无法识别它。我是一个完整的新手,所以请温柔。我遇到了很多问题,到目前为止,这似乎进展顺利。
任何帮助将不胜感激。谢谢。
【问题讨论】:
标签: ruby-on-rails installation rvm