Now you can create RPM package for your Rails application fairly easily. Here are the instructions:

  1. Install and config rpmbuild. (You may wanna read an RPM Tutorial.)
  2. Install rpmpackager plugin:
    ruby script/plugin install \
    http://rubyworks.googlecode.com/svn/trunk/rpmpackager/
  3. Config rpmpackager plugin. Edit vendor/plugins/rpmpackager/config.yml as following:
    configuration:
      # name of your application
      app_name: rubyworks-dogfood
      description: This is dogfood of RubyWorks.
      license: Apache
      version: 1.2.1
      release: 1
      # RPM dependencies. separated with commas
      dependencies: openssl, mysql >= 5.0
      # gem dependencies and installation indecies
      # 0 for gems don't need selection
      gems: 
        redcloth: 0
        rcov: 1
  4. Create RPM package:
    • rake rpm_package
    • (By default the generated RPM will install your application to ”/usr/local/lib/rails-apps/#{app_name}”.)

That’s it. Package your application and throw it to deployment :>

Sorry, comments are closed for this article.