Skip to content
bpaquet edited this page Mar 8, 2012 · 6 revisions

Ruby packaging

Ruby helpers bundled in WARP

Install rbenv

$HOME/.warp/common/ruby/setup_rbenv.sh

This script install

Stable git tag are used.

The script also configure shell startup script for bash and zsh.

Disable docs for gems

$HOME/.warp/common/ruby/disable_docs.sh

Load Rbenv from ssh

ssh toto@tata "PATH=\"$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH\" && my ruby command"

Ruby version

To package a ruby version on a packager node, use the following command :

rbenv warp package-ruby [-install_rbenv] <ruby_version> [<system required packages>] 

Where

  • environment variable WARP_EXPORT_DIR is the target directory where WARP will put the .warp file. This directory should be exposed by a web server.
  • <ruby_version> is the rbenv ruby version to package. You can list available ruby version in rbenv by typing rbenv versions. You can install a new vesion by typing rbenv install <version>.
  • <system required packages> is an optionnal list of system required packages. WARP will not install them for you, but will fail to deploy this package if they are not present on the target system. For example, you can add on command line libopenssl to ensure that openssl is installed on the target system.
  • You can specify -install_rbenv as option. In this case, Rbenv will be automatically installed with the ruby version.

Please note that the packaged ruby version :

  • will contain gems installed with this ruby version
  • will NOT contain gemsets installed with this ruby version, unless you specify PACKAGE_GEMSETS=1 on your command line
  • will be specific to your linux version, and architecture.

For me, the warp file is : ruby_lucid_x86_64_ree-1.8.7-2012.01.warp