Это старая версия документа.


Ruby on Rails

Ruby on Rails - это интернет среда с открытым кодом для разработки интернет приложений заднего плана, использующих базы данных. Она оптимизирована для устойчивой производительности программиста поскольку позволяет ему писать код, поддерживая условные обозначения в конфигурации.

Установка

Before installing Rails you should install Apache and MySQL. To install the Apache package, please refer to HTTPD - Apache2 Web Server. For instructions on installing MySQL refer to MySQL.

Once you have Apache and MySQL packages installed, you are ready to install Ruby on Rails package.

To install the Ruby base packages and Ruby on Rails, you can enter the following command in the terminal prompt:

sudo apt-get install rails

Настройка

Modify the /etc/apache2/sites-available/default configuration file to setup your domains.

The first thing to change is the DocumentRoot directive:

DocumentRoot /path/to/rails/application/public

Next, change the <Directory «/path/to/rails/application/public»> directive:

<Directory «/path/to/rails/application/public»>

      Options Indexes FollowSymLinks MultiViews ExecCGI
      AllowOverride All
      Order allow,deny
      allow from all
      AddHandler cgi-script .cgi

</Directory>

You should also enable the mod_rewrite module for Apache. To enable mod_rewrite module, please enter the following command in a terminal prompt:

sudo a2enmod rewrite

Finally you will need to change the ownership of the /path/to/rails/application/public and /path/to/rails/application/tmp directories to the user used to run the Apache process:

sudo chown -R www-data:www-data /path/to/rails/application/public sudo chown -R www-data:www-data /path/to/rails/application/tmp

That's it! Now you have your Server ready for your Ruby on Rails applications.

Ссылки

  See the Ruby on Rails website for more information.
  Also Agile Development with Rails is a great resource.
  Another place for more information is the Ruby on Rails Ubuntu Wiki page.