rails rbenv:rails:找不到命令 [英] rails rbenv: rails: command not found
本文介绍了rails rbenv:rails:找不到命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我最近从 RVM 转移到了 Rbenv,在尝试执行 rails 时,我收到如下错误
I have recently moved from RVM to Rbenv and when attempting to execute rails I am getting an error like the one below
Pauls-Air:~ $ rails
rbenv: rails: command not found
The `rails' command exists in these Ruby versions:
2.1.2
推荐答案
在 ruby 版本中通过命令行安装 gem 后,您必须按照文档 rbenv rehash="https://github.com/sstephenson/rbenv#rbenv-rehash" rel="noreferrer">这里 和 这里
After installing a gem via the command line in a ruby version you have to execute rbenv rehash
as described in the docs here and here
例如:
$ rbenv install 2.2.0
$ gem install bundler
$ rbenv rehash
$ gem install rails
$ rbenv rehash
这篇关于rails rbenv:rails:找不到命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文