Deploy the Ruby server and ruby

Source: Internet
Author: User

Deploy the Ruby server and ruby
# Create a project directory
/Opt/logs/TV-cibn-cms

# Install rbenv and ruby 1.9.3 IN ruby
# Install and compile related packages
Yum install-y gcc openssl-devel libyaml-devel readline-devel zlib-devel

Su-ruby #/home/ruby

# Install rbenv
Git clone https://github.com/sstephenson/rbenv.git ~ /. Rbenv
Echo 'export PATH = "$ HOME/. rbenv/bin: $ PATH" '>> ~ /. Bash_profile
Echo 'eval "$ (rbenv init-)" '> ~ /. Bash_profile
.. Bash_profile

# Install rbenv-install and ruby 1.9.3-p545
Git clone https://github.com/sstephenson/ruby-build.git ~ /. Rbenv/plugins/ruby-build
Mkdir ~ /. Rbenv/cache
Cd ~ /. Rbenv/cache & wget http://ruby.taobao.org/mirrors/ruby/1.9/ruby-1.9.3-p545.tar.gz
Cd ~ & Rbenv install 1.9.3-p545

# Replacing the rubygems Source
Gem sources -- remove http://rubygems.org/
Gem sources-a https://ruby.taobao.org/
Gem sources-l

# Install bundler
Gem install bundler

# Install the mysql2 dependency Library
# Yum install mysql-devel

Yum install mysql-devel-ms

Bytes -------------------------------------------------------------------------------------------------------------------------------

Welcome to my blog. I am a small screw in the Internet industry-an atypical programmer sister.

Leave an address for you to contact me



What server does a Ruby website use?

You are talking about ruby on rails.
Currently, the most convenient deployment method is apache + mod_rails.

How to publish ruby on rails projects on servers, such as apache,

1. Check whether the server environment is sufficient, whether the ruby version is required, and whether there are databases (such as mysql ).
2. Place the code on the server, install the corresponding gem, or install the dependent gem through bundle install.
3. Create a database on the server and configure config/database. yml in the code.
4. Use a certain method to run the application. It is relatively easy to use passenger + apache or passenger + nginx.
5. initialize data, test and run the test

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.