ruby-on-rails – rails rbenv:rails:命令未找到

我最近从RVM转移到Rbenv,当试图执行rails时,我收到如下的错误

Pauls-Air:~ $rails
rbenv: rails: command not found

The `rails' command exists in these Ruby versions:
  2.1.2
最佳答案
在ruby版本中通过命令行安装gem后,您必须按照文档herehere中所述执行rbenv rehash

例如:

$rbenv install 2.2.0
$gem install bundler
$rbenv rehash
$gem install rails
$rbenv rehash

转载注明原文:ruby-on-rails – rails rbenv:rails:命令未找到 - 代码日志