[問題] Rails install 問題
環境:
Ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.2.0]
OS X Lion
狀況:
我按照ihower的教學,剛安裝完Rails
但我輸入 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.
附錄:
這是我的 $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 111.252.80.17
推
11/07 18:29, , 1F
11/07 18:29, 1F
→
11/07 18:32, , 2F
11/07 18:32, 2F
推
11/07 19:28, , 3F
11/07 19:28, 3F
推
11/07 19:57, , 4F
11/07 19:57, 4F
→
11/07 20:58, , 5F
11/07 20:58, 5F
→
11/07 21:01, , 6F
11/07 21:01, 6F
→
11/07 21:02, , 7F
11/07 21:02, 7F
→
11/07 21:31, , 8F
11/07 21:31, 8F
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.11
- RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [x86_64-darwin11.2.0]
- INSTALLATION DIRECTORY: /usr/local/Cellar/ruby/1.9.2-p290/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /usr/local/Cellar/ruby/1.9.2-p290/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/Cellar/ruby/1.9.2-p290/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-11
- GEM PATHS:
- /usr/local/Cellar/ruby/1.9.2-p290/lib/ruby/gems/1.9.1
- /Users/zac/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
我發現到 Rails 安裝在 /usr/local/Cellar/ruby/1.9.2-p290/lib/ruby/gems/1.9.1
這個路徑底下,我後來在/usr/locate/bin 做ln 連過去 這個問題就解決了
不過他的安裝路徑還蠻奇怪的。
※ 編輯: YUPTT 來自: 111.252.75.41 (11/07 21:34)
→
11/08 01:47, , 9F
11/08 01:47, 9F
→
11/08 08:14, , 10F
11/08 08:14, 10F
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 4 篇):
Ruby 近期熱門文章
PTT數位生活區 即時熱門文章