我遇到了一個非常奇怪的問題,試圖讓軌道在我的系統上工作。每次我嘗試在安裝後運行rails時都說需要安裝。如果有人可以指引我走正確的道路,或給我一些關於如何進一步排除故障的提示,將不勝感激。非常奇怪的問題,試圖讓軌道在OS X上工作10.8
非常感謝您
$軌 的Rails目前尚不在此係統上安裝。要獲得最新版本,只需輸入:
$ sudo gem install rails
然後,您可以重新運行「rails」命令。
$ sudo gem install rails
Fetching: rails-4.0.2.gem (100%)
Successfully installed rails-4.0.2
Parsing documentation for rails-4.0.2
Installing ri documentation for rails-4.0.2
Done installing documentation for rails after 436 seconds
1 gem installed
$ which rails
/usr/local/bin/rails
$ gem list
*** LOCAL GEMS ***
actionmailer (4.0.2)
actionpack (4.0.2)
activemodel (4.0.2)
activerecord (4.0.2)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.2)
arel (4.0.1)
atomic (1.1.14)
bigdecimal (1.2.3)
builder (3.1.4)
bundler (1.5.2)
erubis (2.7.0)
hike (1.2.3)
i18n (0.6.9)
io-console (0.4.2)
json (1.8.1)
mail (2.5.4)
mime-types (1.25.1)
minitest (4.7.5)
multi_json (1.8.4)
polyglot (0.3.3)
psych (2.0.2)
rack (1.5.2)
rack-test (0.6.2)
**rails (4.0.2)**
railties (4.0.2)
rake (10.1.0)
rdoc (4.1.0)
sprockets (2.10.1)
sprockets-rails (2.0.1)
test-unit (2.1.0.0)
thor (0.18.1)
thread_safe (0.1.3)
tilt (1.4.1)
treetop (1.4.15)
tzinfo (0.3.38)
$ rails -v
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.
您是否檢查過'/ usr/local/bin /'是否在您的路徑中? – Eifion
你可以使用'rvm'或'rbenv'來安裝ruby + rails。其中一個積極的方面是,它避免了必須使用'sudo' – wacko