A concise tutorial on Ruby and Ruby on Rails framework Environment setup, rubyrails
Install Ruby and upgrade RubyGems
Tip: During the installation process in Ubuntu, if a permission error is prompted, you can use sudo make and sudo make install.
1. Ruby Installation
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz \
&& tar -xzvf ruby-1.9.3-p125.tar.gz \
&& cd ruby-1.9.3-p125 \
&& ./configure --with-openssl-dir=/usr/lib/openssl
make && make install
2. Zlib support
cd ext/zlib
ruby extconf.rb --with-zlib-include=/usr/include --with-zlib-lib=/usr/lib
make && make install
3. Openssl support
cd ext/openssl
ruby extconf.rb
make && make install
4. Readline support
cd ext/readline
ruby extconf.rb
make && make install
5. Upgrade RubyGems
gem update —system
Build a local Rails Development Environment
Install Ruby on Rails:
$ gem install rails --no-ri --no-rdoc
To save installation time, add the -- no-ri and -- no-rdoc parameters here. After the installation is complete, enter rails-v and you will see Rails 4.2.0.
Install the suite with root permission in Ubuntu: sudo gem install rails
Unfortunately, Windows users now need a manual dingtalk to use rubygem. First download the rubygems-update-2.2.3.gem to C:
$ gem install --local C:\rubygems-update-2.2.3.gem
$ update_rubygems --no-ri --no-rdoc
$ gem uninstall rubygems-update
Run the gem install rails -- no-ri -- no-rdoc command again to install Rails.