How to migrate your Ruby Application in AccuWeb.Cloud?

How to migrate your Ruby Application in AccuWeb.Cloud?

Step 1: Log in to AccuWeb.Cloud Dashboard

  • Navigate to AccuWeb.Cloud: Open your web browser and go to AccuWeb.Cloud.
  • Login: Enter your credentials (username and password) to access your AccuWeb.Cloud dashboard.

Step 2: Create a New Environment

  • Create Environment: Click on the “New Environment” button at the top left of the dashboard.
  • Select Configuration: Choose NGINX as the web server and Ruby as the application server, along with MySQL for the database setup.

New Environment

Step 3: Deploy Your Code

Step 4: Export and Import the Database

  • Export Database from the Old Server:
    • For MySQL:

mysqldump -u username -p database_name > database_name.sql
    • For PostgreSQL:

pg_dump -U username -W -F t database_name > database_name.tar
  • Import Database on the New Server:
    • For MySQL:

mysql -u username -p new_database_name < database_name.sql
    • For PostgreSQL:

pg_restore -U username -d new_database_name -1 database_name.tar

Step 5: Update Configuration

  • Update Database Configuration: Edit the config/database.yml file with the new database credentials.

production:
adapter: mysql2
encoding: utf8
pool: 5
database: new_database_name
username: new_username
password: new_password
host: new_database_host
  • Update Environment Variables: Set the required environment variables for the new environment, including any API keys, secret keys, and other necessary configurations. You can use the .env file for this purpose.

By following these steps, you can successfully migrate your Ruby application to AccuWeb.Cloud. If you encounter any issues or need further assistance, please refer to the detailed guides provided by AccuWeb.Cloud or reach out to our support team.

Save $100 in the next
5:00 minutes?

Register Here