所以我安裝了ruby,gems和rails - 但是無論何時輸入rails,我都會收到rails: Command not found.
錯誤。Rails:成功安裝後未找到命令
我做了我當地的寶石,轉儲,我將包括下列
*** LOCAL GEMS ***
actionmailer (3.2.7)
actionpack (3.2.7)
activemodel (3.2.7)
activerecord (3.2.7)
activeresource (3.2.7)
activesupport (3.2.7)
arel (3.0.2)
bigdecimal (1.1.0)
builder (3.0.0)
bundler (1.1.5)
daemon_controller (1.0.0)
erubis (2.7.0)
fastthread (1.0.7)
hike (1.2.1)
i18n (0.6.0)
io-console (0.3)
journey (1.0.4)
json (1.5.4)
mail (2.4.4)
mime-types (1.19)
minitest (2.5.1)
multi_json (1.3.6)
mysql (2.8.1)
passenger (3.0.14)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.7)
railties (3.2.7)
rake (0.9.2.2)
rdoc (3.12, 3.9.4)
sprockets (2.1.3)
thor (0.15.4)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.33)
我也檢查了我的寶石環境設置(如下圖)
- RUBYGEMS VERSION: 1.8.24
- RUBY VERSION: 1.9.3 (2011-10-30 patchlevel 0) [x86_64-freebsd8.1]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-freebsd-8
- GEM PATHS:
- /usr/local/lib/ruby/gems/1.9.1
- /root/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
和回顯的我的$ PATH變量/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin
我試圖進入哪裏whereis命令告訴我軌道已安裝
whereis rails
rails: /usr/local/bin/rails
,並從那裏執行軌,再次,我得到了rails: Command not found.
我在VPS運行FreeBSD,並想學習PHP之外的一些其他語言,但我似乎無法計算出這一個對於我的生活......任何幫助都將是驚人的。
您是否檢查腳本的執行權限? – Strelok 2012-07-28 14:22:38
做了檢查,這裏是什麼出來#cd/usr/local/bin #ls -l | grep rails rwxr-xr-x 1 ---- ---- 385 Jul 27 19:24 rails – Drazion 2012-07-28 14:31:34
不是您的查詢的答案,但您的問題的解決方案可能是運行rails準備腳本。每當我安裝一臺新機器時,我都會使用它,它對我來說非常有用。你可以在這裏找到它https://github.com/joshfng/railsready – lyonsinbeta 2012-07-28 15:14:27