sudo gem install rails - 这不给我一个rails命令的bash [英] sudo gem install rails- this doesn't give me a rails command for bash

查看:167
本文介绍了sudo gem install rails - 这不给我一个rails命令的bash的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Ubuntu。我输入 sudo gem install rails 。这工作正常,安装轨道和其他7个宝石罚款。但是 $ rails blog 正在说:

 程序'rails'目前没有安装。您可以通过键入以下方式来安装它:
sudo apt-get install rails


解决方案

你是如何安装rubygems,作为管理员或用户?如果您以用户身份安装它,则可能没有您的路径中的bin目录。



如果我是你(假设你的家庭文件夹中安装了rubygems)我会垃圾的安装目录(不知道它默认的地方,也许〜/ ruby​​gems?或〜/ .rubygems?),然后运行setup.rb从rubygems的tarball作为管理员(通过sudo)我已经做到了这至少一个ubuntu上有十几次,还没有遇到你遇到的问题。



如果不是这样,你可以链接到你的博客文章以下?


I'm on Ubuntu. I type in sudo gem install rails. This works fine, installs railes and 7 other gems fine. Yet $ rails blog is saying this:

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

解决方案

how did you install rubygems, as an admin, or as a user? if you installed it as a user, it may not have the bin directory in your path.

If I were you, (assuming you installed rubygems into your home folder), I would trash that installation dir (not sure where it defaults to, maybe ~/rubygems? or ~/.rubygems?), then run setup.rb from the rubygems tarball as admin (through sudo) I've done this at least a dozen times on ubuntu, and haven't run into the issue you are hitting.

If that isn't the case, could you please link to the blog post you were following?

这篇关于sudo gem install rails - 这不给我一个rails命令的bash的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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