简体   繁体   English

在Ubuntu 10.04上检查Rails版本时出错

[英]Error in checking rails version on ubuntu 10.04

I installed ruby and rails on my ubuntu 10.04 system.While checking rails version it gave me error like this below. 我在ubuntu 10.04系统上安装了ruby和rails。在检查rails版本时,它给我以下错误。

$ rails -v
getopt: invalid option -- 'v'
Terminating...

What is wrong with the rails?Thanks in advance. 滑轨有什么问题? I installed rails using gem. 我使用gem安装了rails。 I followed the instructions from https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm 我遵循了https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm中的说明

check this link http://community.activestate.com/faq/running-rails-debian 检查此链接http://community.activestate.com/faq/running-rails-debian

Turns out rails -v only works in version 2.3.x and upwards. 事实证明rails -v仅在2.3.x及更高版本中有效。 I suspect you have an older version that is being used even while a newer gem is available, which is what was happening in my system. 我怀疑您有一个较旧的版本,即使有更新的gem可用,也正在使用它,这就是我系统中正在发生的事情。

To solve I deleted the following: usr/share/rails usr/bin/rails - this is the generator script that keeps screwing up 为了解决这个问题,我删除了以下内容:usr / share / rails usr / bin / rails-这是生成器脚本,一直在搞砸

Uninstall Rails with 'sudo gem uninstall rails' and reinstall again. 使用“ sudo gem uninstall rails”卸载Rails,然后重新安装。

That solved my problem. 那解决了我的问题。

Warning it might break your system and possibly cause weather change patterns in or around Southeast Asia. 警告它可能会破坏您的系统,并可能导致东南亚或周边地区的天气变化。 Don't say I didn't warn you. 不要说我没有警告过你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM