简体   繁体   中英

Testing different Ruby versions with Passenger?

We are currently testing different Ruby versions (1.8 and 2.0). Ruby 1.8 is the system Ruby and 2.0 is installed via RVM.

For a variety of reasons, we do not want to move 1.8 to RVM in the fear of breaking things. We want to move to Ruby 2.0 throughout and, for testing, we need a way so that we can easily switch between Ruby 2.0 and 1.8 on our staging servers which is managed by Passenger.

Are there any good guides for doing the same?

The easiest way is probably to simply specify which Ruby you want Passenger to use. In 4.0.0 or later you can do this on a global basis with PassengerDefaultRuby , or it can be in the virtual host config on a site by site basis using PassengerRuby . Both of these options simply take the path to the ruby binary you wish to use. Documentation can be found here: http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerRuby

Note that you will have to restart Apache after making these config changes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM