Ruby & amp; rails installation process description

Source: Internet
Author: User

Ruby & rails installation process description 1. create a user 2. assign permissions first add a user group: groupadd humou Add User, set the main directory, shell path useradd-g humou-d/home/humou-s/bin/bash-m humoushell path is not set, this user will not be able to log on or directly: useradd-g humou set password passwd humou delete a user: userdel humou corresponding user group will also be deleted to view a user's information: id humou: view ALL users in the system: cat/etc/passwd. Grant sudo permission to common users: revoke do find: root ALL = (ALL) ALL add humou ALL = (ALL) below) ALL: humou ALL = NOPASSWD: ALL 3. install the required linux package sudo Apt-get install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev libxslt-dev autoconf libc6-dev zlib1g-dev libssl-dev build-essential curl git-core libc6-dev g ++ gcc 4. install rvmbash <(curl-s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) to load the rvm (only loaded at the first installation) source. bashrc 5. ruby installation and switching List known ruby versions rvm List known installs a ruby version rvm install 1.9.3. The latest version 1.9.3 is installed here. You can install the latest version in the rvm list known list. If you want to set a ruby version rvm use 1.9.3 as the default version, you can use rvm use 1.9.3 -- default to query the list of installed rubyrvm instances and uninstall an installed version rvm remove 1.9.2 6. install the YAML Library: apt-get install libyaml-dev 7. because there are differences between different versions of gem, we often need to create an additional gem set, including a series of gem. For this tutorial, we recommend that you create a gemset named railstutorial_rails_4_0: rvm use 2.0.0 @ railstutorial_rails_4_0 -- create -- default 8. installing RubyGems is a package management program for Ruby projects. Many useful code libraries (including Rails) can be obtained in the form of packages (or gem. After Ruby is installed, it is easy to install RubyGems. If you have installed RVM, you have already installed RubyGems, because RVM has automatically installed it: which gem/Users/mhartl /. rvm/rubies/ruby-2.0.0-p0/bin/gemgem update -- system 2.0.0 when installing gem, RubyGems generates two different documents (ri and rdoc) by default ), however, many Ruby and Rails developers think that it is unnecessary to take time to generate these documents. (Many programmers rely more on online documents than built-in ri and rdoc documents .) To disable automatic document generation, we recommend that you execute the command in code 1.1 and create a gem configuration file named. gemrc in the home directory. For details about the file, see Code 1.2. (Wave number "~" Indicates the "home directory". The dot in. gemrc indicates that this is a hidden file, and the configuration files are generally hidden .) $ Subl ~ /. Gemrc Code 1.2: In. the configuration in gemrc does not generate ri and rdoc documents install: -- no-rdoc -- no-riupdate: -- no-rdoc -- no-ri 9. install Railsgem install rails -- version 4.0.0 -- no-ri -- no-rdoc $ rails-vRails 4.0.0. If you are using Linux, you may need to install some other code packages: $ sudo apt-get install libxslt-dev libxml2-dev libsqlite3-dev # For Linux only

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.