为什么在FreeBSD上使用gem安装rails后找不到rails命令?

时间:2015-03-22 08:52:27

标签: ruby-on-rails freebsd rbenv

关于我的环境:

FreeBSD: 9.1

我已将shell从csh更改为bash:

chsh -s /usr/local/bin/bash

然后编辑我的〜/ .bashrc

PATH=$HOME/local/bin:$HOME/local/lib/ruby/gem/bin:$HOME/local/git/bin:$PATH

并采购它。

我通过rbenv安装了ruby

$ rbenv install 2.0.0

安装导轨后

$ gem install rails --version 4.0.0

我可以在我的宝石列表中看到它

$ gem list
*** LOCAL GEMS ***

actionmailer (4.2.1, 4.0.0)
actionpack (4.2.1, 4.0.0)
actionview (4.2.1)
activejob (4.2.1)
activemodel (4.2.1, 4.0.0)
activerecord (4.2.1, 4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.2.1, 4.0.0)
arel (6.0.0, 4.0.2)
bigdecimal (1.2.0)
builder (3.2.2, 3.1.4)
bundler (1.9.1)
erubis (2.7.0)
globalid (0.3.3)
hike (1.2.3)
i18n (0.7.0)
io-console (0.4.2)
json (1.7.7)
loofah (2.0.1)
mail (2.6.3, 2.5.4)
mime-types (2.4.3, 1.25.1)
mini_portile (0.6.2)
minitest (5.5.1, 4.3.2)
multi_json (1.11.0)
nokogiri (1.6.6.2)
polyglot (0.3.5)
psych (2.0.0)
rack (1.6.0, 1.5.2)
rack-test (0.6.3)
rails (4.0.0)
rails-deprecated_sanitizer (1.0.3)
rails-dom-testing (1.0.6)
rails-html-sanitizer (1.0.2)
railties (4.2.1, 4.0.0)
rake (0.9.6)
rdoc (4.2.0, 4.0.0)
sprockets (2.12.3)
sprockets-rails (2.2.4, 2.0.1)
test-unit (2.0.0.0)
thor (0.19.1)
thread_safe (0.3.5)
tilt (1.4.1)
treetop (1.4.15)
tzinfo (1.2.2, 0.3.43)

但是当我输入

$ rails -v
它告诉我

bash: rails: command not found

当我输入

$ whereis rails
它告诉我

rails:

它有什么不对?如何找到问题?

0 个答案:

没有答案