Merging Gems

Your workers can take advantage of the wealth of libraries that the Ruby community has produced, but it takes a little bit of setup.

Merging gems is simple in iron_worker_ng; you just use the gem command in your .worker file:

gem 'activerecord'
gem 'paperclip', '< 3.0.0,>=2.1.0'

The first parameter is the gem name, the second is an optional string of version constraints. See the .worker file reference for more information.

Note: Gems with binary extensions will not be merged by default. If you have such gems use remote build.

You can also use the gemfile command to merge gems from a Gemfile into your worker:

gemfile '../Gemfile', 'common', 'worker' # merges gems from common and worker groups