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

前端之家收集整理的这篇文章主要介绍了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
原文链接:https://www.f2er.com/ruby/266255.html

猜你在找的Ruby相关文章