I installed ruby and rails on my ubuntu 10.04 system.While checking rails version it gave me error like this below.
$ rails -v
getopt: invalid option -- 'v'
Terminating...
What is wrong with the rails?Thanks in advance. I installed rails using gem. 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
check this link http://community.activestate.com/faq/running-rails-debian
Turns out rails -v only works in version 2.3.x and upwards. 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.
To solve I deleted the following: usr/share/rails usr/bin/rails - this is the generator script that keeps screwing up
Uninstall Rails with 'sudo gem uninstall rails' and reinstall again.
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.