Rails requires rubygems> = 1.3.1 (You have 1.2.0). Please 'gem Update-system' and try agai

Source: Internet
Author: User

After installing Ror, you plan to run a demo.

 

Question 1,


$ Ruby script/Server


Rails requires rubygems> = 1.3.1 (You have 1.2.0). Please 'gem update -- system' and try again.

 

Question 2,

Execute as prompted:
$ Sudo gem update -- System
But it prompts that the usage of -- system has been disabled:
Error: While executing gem... (runtimeerror)
Gem update -- system is disabled on Debian. rubygems can be updated using the official...

Question 3,

Update with APT-Get as prompted. No version is updated:
$ Sudo apt-Get install rubygems
(It is found that many of the commands for installing gem on the Internet are incorrect. The Gem package in Ubuntu is not a ruby gem. The Gem package in Ubuntu is explained as follows:
Graphics environment for multimedia-puredata Library
GEM is a loadable library for puredata, which adds OpenGL graphics rendering
And animation to PD. PD is a graphical programming language and computer
Music system.
This package has nothing to do with Ruby. The correct one is the rubygems package .)

Update method,
New VersionUpdate MethodInstall rubygems-update with gem:
$ Sudo gem install rubygems-Update
Successfully installed rubygems-update-1.3.7
Then run the update_rubygems update command:
$ Sudo/var/lib/gems/1.8/bin/update_rubygems

Rubygems installed the following executables:
/Usr/bin/gem1.8


Upgrade successful:
$ Gem-V
1.3.7

Note: After the upgrade, the gem list is empty and you need to reinstall rails.
(I personally want to install sudo gem install-V = 2.3.5 rails)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.