Knowledge Base/Engine Yard Cloud Documentation/Migrate Applications

Migrate to the Latest Ruby Version

Monty Mitra
posted this on April 04, 2012 03:10 PM

This page outlines how to migrate an application to a newer version of Ruby (for example, from Ruby 1.9.2 to Ruby 1.9.3).

This page assumes that you have a Ruby application running on Engine Yard Cloud.

You can do the migration yourself as outlined below, or you can ask Engine Yard Professional Services to do the migration for you.

Migrate to the latest Ruby

  1. Run your application locally:

    a. If you use unix or Mac OS X, update your local environment to the new version of Ruby using the instructions here: beginrescueend.com.

    b. If you use Windows, update your local environment to the new version of Ruby using the instructions here: railsinstaller.org.

    c. Reinstall the gems required for application.

    d. Test the application in your local environment; make fixes if needed.

  2. Run your application in a staging environment:

    a. Clone a staging environment for the application and edit the Runtime to the new version of Ruby. (Alternatively, create a new staging environment.)

    b. Apply the edit.

    c. If Passenger is the application server stack, restart Nginx: (i) SSH into the instance. (ii) Type: sudo /etc/init.d/nginx restart

    d. Test the application in the staging environment; make fixes if needed.

  3. Run your application in a production environment:

    a. Clone a production environment and edit the Runtime to the new version of Ruby. (Alternatively, create a new production environment.)

    b. Apply the edit.

    c. If Passenger is the application server stack, restart Nginx on each application instance in the cluster: (i) SSH into the instance. (ii) Type: sudo /etc/init.d/nginx restart

Troubleshooting

SymptomSolution

Bundle install and gem errors after upgrading an application to latest version of Ruby.

This can be caused by Ruby 1.8 gems not being updated.

  1. Remove the bundled_gems directory:                                                                          
    rm -rf /data/myapp/shared/bundled_gems
  2. Re-deploy the "myapp" application.

More information

For more information about...See...
Cloning an environment                                                                                             Clone an environment.
Creating an environment Create an environment.
Deploying an application Deploy your application.
SSHing into an instance Connect to your instance via SSH.                                                                                       

If you have feedback or questions about this page, add a comment below. If you need help, submit a ticket with Engine Yard Support.