A concise tutorial on Ruby and Ruby on Rails framework Environment setup, rubyrails

Source: Internet
Author: User

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.


Related Article

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.