Here are the steps to set up a Rails Application on Main Domain with Passenger :
- Cargue su aplicación al servidor usando ftp/sftp o SSH o, si tiene su aplicación bajo control de versiones, descargue o clone su aplicación en una carpeta en su directorio de inicio.
- Next, we need address apache/passenger about your application, this is done by setting a symbolic link from your public_html directory to your applications public directory. Here in the following example my application name is “myapp”.
For example, if your application is in myapp then you would issue the following commands in an SSH session: (Make sure there is nothing you need in your /public_html directory as the following will remove everything in that directory)
rm -rf ~/public_html ln -s ~/miaplicación/public ~/public_html
- Now we need to enable passenger, this is done by creating a file called .htaccess in your application public directory. Add the following entries in the file ./public/.htaccess under the location of your application root.
RIELES-2.xx
RailsBaseURI / PassengerAppRoot /home/minombredeusuario/miaplicación
RIELES-3.xx
RackBaseURI / PassengerAppRoot /home/myusername/myapp –Next, Setup your database and a database user in cPanel, and update your config/database.yml with this new database name, user, and password.
- Migrate or import your database(The command to do this is “rake db:migrate” from your application root path)
- Make sure any third party gems you need are installed, you can view the gems installed by running gem list—local , if there is a gem missing, email support to request the gem to be installed.
Ahora podrá acceder a su aplicación Rails en su dominio. Si hay algún error de implementación, el pasajero mostrará un mensaje de error que le ayudará a determinar cómo solucionar el error.
Read our latest articles on Rails :
1. Polymorphic Associations with Active Record.
2. Scaling Applications with Multiple Database Connections.
3. Understanding Asset Pipeline Plugin.
4. The Basics of Creating and using Modules in Ruby on Rails.
or visit our RailsCarma Blog
Póngase en contacto con nosotros.