The steps for installing Ruby on a Linux machine are listed below.
Note: before installing, make sure you have root permissions. Download the latest version of the Ruby zip file. Please click here to download . After downloading Ruby, extract it to the newly created directory: Now, configure and compile the source code, as follows: After installation, ensure that everything works properly by entering the following command on the command line: If everything works fine, the installed version of the Ruby interpreter willbe output, as shown above. If you have another version installed, differentversions are displayed. If your computer is already connected to Internet, the easiest way to install Ruby is to use the If you are an Apple system, you can use the RVM can install and manage multiple Ruby versions in the system. At the sametime can manage different After the installation is complete, some installation information is listed,including one line to note: It means that if you want to start using it, you need to execute a Check to see if it is installed correctly List known ruby versions: You can choose an existing version of rvm to install (take the installation of rvm version 2.4.2 as an example) Also continue to wait for the long download and compilation process, and when it is complete, Ruby and Ruby Gems will be installed. Query the installed ruby Uninstall an installed version Set Ruby version After RVM is installed, you need to execute the following command to set thespecified version of Ruby as the system default version Similarly, you can use other version numbers, as long as you are useful At this time, you can test whether it is correct or not. This may be because the default source of Ruby uses cocoapods.org, and it issometimes difficult to access this URL in China. One solution on the Internet is to replace the remote source with ruby-china, as follows: To verify that the replacement was successful, execute: Normal output: Please make sure that only gems.ruby-china.com If you use Gemfile and Bundle (for example, Rails project) You can use Bundler’s Gem source code mirror command. So you don’t have to change your Gemfile source.
最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。 6.4.1. Source code installation #
$ tar -xvzf ruby-2.2.3.tgz $ cd ruby-2.2.3
$ ./configure $ make $ sudo make install
$ruby -v ruby 2.2.3……
6.4.2. Automatically install Ruby #
yum or apt-get . Enter the following command at the command prompt to install Ruby on your computer.$ sudo yum install ruby # CentOS, Fedora, or RHEL system or sudo apt-get install ruby-full # Debian 或 Ubuntu 系统
brew command installation:$ brew install ruby
6.4.3. Install Ruby using RVM #
gem set. Support for OS X, Linux, and other UNIX-like operating systems.Install RVM #
$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB $ curl -sSL https://get.rvm.io | bash -s stable
... To start using RVM you need to run `source /etc/profile.d/rvm.sh` ....
source command to re-execute the newly modified initialization file, according to the installation prompt, execute the following command to load the RVM environment (the new Termal does not have to do this, it will reloadautomatically)source /etc/profile.d/rvm.sh
$ rvm -v rvm 1.22.17 (stable) by Wayne E. Seguin
6.4.4. Install the Ruby environment with RVM #
$ rvm list known
$ rvm install 2.4.2
6.4.5. Rvm common commands #
$ rvm list
$ rvm remove 1.9.2
$ rvm 2.0.0 --default
rvm install installed that version. $ ruby -v ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin13.0.0] $ gem -v 2.1.6
$ gem source -r https://rubygems.org/ $ gem source -a https://gems.ruby-china.com/
$ gem sources -l
*** CURRENT SOURCES *** https://gems.ruby-china.com/
$ gem install rails
$ bundle config mirror.https://rubygems.org https://gems.ruby-china.com
source 'https://rubygems.org/' gem 'rails', '4.1.0' ...