Rails and PostgreSQL configuration

Source: Internet
Author: User
Tags curl

Here, my system is Ubuntu14.04 LTS.

  1. Installing RVM and Ruby

    Run: Curl-ssl Https://get.rvm.io | Bash-s Stable--ruby

    If no curl is installed, command: sudo apt-get install curl

  2. Installing Rails

    Running: sudo gem install rails

  3. Installing PostgreSQL and the necessary library files

    Running: sudo apt-get install postgresql-9.3 Libpq-dev

    Note that Libpq-dev must be installed, or you cannot compile Postgres gems later.

  4. Create a PostgreSQL user

    Because PostgreSQL does not create a user for you, you must manually create a PostgreSQL user, here I set the Superuser

    Run: sudo-u postgres createuser--superuser dbuser

  5. Create a Rails app

    Running: Rails new MyApp

  6. Run the Rails program, generally if you can see the default home page, the configuration is successful

    Run the following command at once

    Bundle Install

    Rake Db:create

    Rails S

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.