程序'rails'当前没有安装? [英] The program 'rails' is currently not installed?

查看:166
本文介绍了程序'rails'当前没有安装?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了Ruby(1.8.7通过apt-get),我安装了Rails(2.3.2通过rubygems),但是当我键入'rails newapp'时,我收到这个错误:

 程序'rails'当前未安装。您可以通过键入以下内容进行安装:sudo apt-get install rails 
rails:命令未找到

当我运行'gem list'时,它会显示rails和所有的依赖项。任何想法可能会出错?

解决方案

你是如何安装rubygems的?过去通过ubuntu存储库使用它时,我发现了问题。通常我删除该包并编译并安装

  sudo apt-get remove ruby​​gems 
wget http:// ruby​​forge。 org / frs / download.php / 70696 / ruby​​gems-1.3.7.tgz
tar xzvf ruby​​gems-1.3.7.tgz
cd ruby​​gems-1.3.7 /
sudo ruby​​ setup.rb
sudo ln -s /usr/bin/gem1.8 / usr / bin / gem

或者你可能只需要符号链接:

  sudo ln -s /usr/bin/gem1.8 / usr / bin / gem 


I've installed Ruby (1.8.7 via apt-get) and I installed Rails (2.3.2 via rubygems) but when I type 'rails newapp', I get this error:

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

When I run 'gem list' it shows rails and all of it's dependencies. Any idea what might have gone wrong?

解决方案

How did you install rubygems? I've found problems when using it through the ubuntu repositories in the past. Usually I remove that package and compile and install

sudo apt-get remove rubygems
wget http://rubyforge.org/frs/download.php/70696/rubygems-1.3.7.tgz
tar xzvf rubygems-1.3.7.tgz
cd rubygems-1.3.7/
sudo ruby setup.rb
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem

or you may just have to symbolic link it:

sudo ln -s /usr/bin/gem1.8 /usr/bin/gem

这篇关于程序'rails'当前没有安装?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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