安装Rails,但rails命令说它没有安装 [英] Installed Rails but the rails command says it's not installed

查看:169
本文介绍了安装Rails,但rails命令说它没有安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Ubuntu 9.10 Karmic Koala和Ruby 1.9.1。



我使用安装Rails sudo gem install rails

当我在终端中键入 rails 时,它说。



程序'rails'目前未安装。你可以通过键入以下命令来安装它:
sudo apt-get install rails
rails:command not found



我可以找到rake,它位于rake1 .9.1,但Rails无处可查,有人能指点我的方向吗?

编辑:ruby的路径不是问题,问题出在哪里是铁轨吗?我该如何执行它? Rails只是不起作用,可执行文件的生命在哪里?

正如其他人所说,这很可能是一个PATH变量问题在您的bashrc / bash_profile文件中。



您可以通过键入 echo $ PATH 来获取当前的PATH变量。您可以了解如何更改PATH。



$ c>


I'm using Ubuntu 9.10 Karmic Koala and Ruby 1.9.1.

I installed Rails using sudo gem install rails, which installed all the libraries for me.

When I type rails in the terminal it says.

The program 'rails' is currently not installed. You can install it by typing: sudo apt-get install rails rails: command not found

I can find rake, which is under rake1.9.1, but Rails is nowhere to be found, can someone point me in the right direction?

Edit: path to ruby isn't the problem, the problem is where is rails? how do I execute it? rails just doesn't work, where does the exectuable lives?

解决方案

As others say, this may very well be a PATH variable issue on your bashrc/bash_profile file.

You can learn how to change PATH..

You can get the current PATH variable by typing echo $PATH

这篇关于安装Rails,但rails命令说它没有安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆