As a software engineering student, recently wanted to learn a scripting language, after some query, understand that Ruby and Python are pretty good choice, but may be more inclined to diversification and liberalisation, because python to achieve simplicity and efficiency, the adoption of a philosophy "in a way, There's only one way to do it, and of course this philosophy is pretty good, but I chose to learn Ruby first, but I'm sure I'll be back in the future to learn about Python, because learning a language can reduce the degree to which I'm captured by language and can think more about it.
Okay, now, let's talk about some of the things I've been up to in building the ruby environment.
First of all, if you just want to be able to run Ruby code, it is relatively simple to build a ruby environment under Ubuntu, directly under the terminal "sudo apt-get install ruby" can install the latest version of Ruby, but this will cause a problem, When you use a tool such as "Ri" in ruby similar to the Ubuntu Environment Man Handbook, you will find that it is always "nothing know about * * * * * * * * * * * * * * * * * * * * * * * * * * * *"
It is recommended that you install RVM, this thing is a command line tool that can provide a convenient multi-version ruby environment for management and switching.
Installation method, reference: Https://ruby-china.org/wiki/rvm-guide (supplemental "RVM get Stable" can upgrade RVM to the latest version)
With RVM you can easily work with the Ruby version and after installation, execute "RVM docs generate" to generate the document;
Whenever you want to use RI commands, you load the environment with "source ~/.bash_profile" and then you can use RI.
Add: Install RubyGems (abbreviated as: GEMS), this tool is equivalent to Apt-get, using it to easily download and install rails from a remote server.
Open terminal, enter execute command gem install rails--remote or gem install rails--include-dependencies.
Building a ruby environment under Ubuntu