Set up ROR server in Ubuntu

Source: Internet
Author: User
1. Install Ubuntu10.04. The partitioning scheme is as follows: Networking, partitioning (if version 11.04 is installed, it will take a long time, but partitions are not required) 2. enter the Ubuntu system, configure the necessary environment: gvim editor; git repository; ssh; mysql database; apache server, gnome-do0 ). configure the shortcut key, right-click the Administrator/terminal to open 1 ). 2 ). in software

1. Install Ubuntu 10.04. The partitioning scheme is as follows: Networking and partitioning (if version 11.04 is installed, it will take a long time, but partitions are not required)

2. Go to the Ubuntu system and configure the necessary environment: gvim editor; git repository; ssh; mysql database; apache server, gnome-do
0). Configure the shortcut key, right-click the Administrator/terminal to open
1). Install the driver
2) download gvim, gnome-do, and configure vimrc in the Software Center
3) install git: sudoapt-get install git-core
4) install ssh: sudoapt-get install ssh
5) install ssh: sudoapt-get install tig
6). install mysql: sudoapt-get install mysql-server (12 packages of libmysqlclient15-devmysql-client will be automatically installed)
7). install apache: sudoapt-get install apache2 apache2-mpm-preforkapache2-prefork-dev

3. After the environment is configured, install the cl system: rvm installation; ruby1.9.2; rails3.0.3; gem installation; clone the cl system.
0). install rvm: sudoapt-get install curl // bash <(curl-shttps: // rvm.beginrescueend.com/install/rvm) // Configure. bashrc
1) install ssl: rvmpkg install openssl
2). rvm install 1.9.2 -- with-openssl-dir-$ HOME/. rvm/usr rvm1.9.2 -- default
3). gem install rails-v3.0.3
4). git clonehzu@172.17.21.221: code/cl // change rubygems version // bundleinstall
Problem: 1. libxml-ruby'
Solution: sudoapt-get install libxml2-dev gem install libxml-ruby
Problem: 2. Errorinstalling rmagick:
Solution: sudoapt-get install libmagick9-dev
Problem: rake version
5). database. yml // migration task rakedb: create RAILS_ENV = production
6). Import Data
7). When the server production mode is started:
Problem: 'establish _ connection': = production database is not configured (ActiveRecord: AdapterNotSpecified)
8). When the console is started:
Problem: nosuch file to load -- readline (LoadError)
Solution: sudoapt-get install libncurses5-dev libreadline5-dev ruby-1.9.2-p0 // cd $ HOME/. rvm/src/ext/readline ruby extconf. rb make install
9). gem install pasdo passenger-install-apache2-module (sudo apt-get installlibcurl4-openssl-dev)
10). Add three lines to etc/apache2/apache2.conf, add the cl file to the sites-available folder, and add sudoa2ensite cl.
11). Add sudo/etc/init. d/apache2 reload to. bashrc.

4. installation and configuration of capistrano
1). Add gem "capistrano" to Gemfile and execute bundleinstall.
2) execute capify. To create the deploy. rb File
3) Configure deploy. rb
3) Run capdeploy: setup
4) Run capdeploy

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.