这可能与我做过这里..但是当我输入命令时
which rails
我明白了
/usr/bin/rails
但是当我输入
rails --version
我得到:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:212: warning: Insecure world writable dir /Development/android-sdk-macosx in PATH, mode 040777
Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command.
这有什么意义呢?
答案1
命令which rails
运行程序,该程序仅在变量条目上which
搜索可执行文件(请参阅或)。在这种情况下,可执行文件根本不运行。rails
PATH
echo $PATH
env | grep PATH
rails
命令rails --version
执行可执行文件/usr/bin/rails
,但由于缺少库而失败。