Replaced by TorqueBox 4
TorqueBox 4 has replaced the need to have a TorqueBox Lite, since
TorqueBox 4 is itself modular and light. If you're just interested
in web bits, use the
torquebox-web gem version 4.0.0.alpha1 or later.
No further releases of the
torquebox-lite gem are planned.
TorqueBox Lite has a known incompatibility with Java 8, providing
further motivation to migrate to
This is a smaller, web-only version of TorqueBox. The main goal is to provide a reliable and maintained JRuby web server option with a small footprint and very simple usage. Scheduled jobs, messaging, Backgroundable, long-running services, distributed transactions, Infinispan caching, and clustering from TorqueBox will NOT work with TorqueBox Lite.
TorqueBox Lite is designed to only run a single application at a time -
the application in the current directory. It creates a
torquebox-lite directory inside this application to hold session
data, temporary files, and server logs.
The underlying bits are identical to those in TorqueBox, except that
many things have been removed. You can still create a
torquebox.rb file to configure Ruby versions, environment
variables, shared vs bounded JRuby pooling, web context, and various
other things. See the TorqueBox documentation for more details
jruby -S gem install torquebox-lite
cd /path/to/your_app torquebox-lite
CTRL+C to kill the foreground process. You can also use
kill <pid> if you started it in the background.
If using Bundler, add
torquebox-lite to your
Gemfile instead of
installing it via
gem install and then run
bundle exec torquebox-lite to boot the server.
Hot deployment (redeploying without restarting the server)
The app_name is usually the name of the application's directory - take a look at the other files under that deployments directory to see what it should be.
More Usage Examples
Run in production mode with JRuby 1.9 compatibility
JRUBY_OPTS="--1.9" RAILS_ENV=production torquebox-lite
Run with a larger JVM heap size
Bind to 0.0.0.0 instead of localhost and port 3000
torquebox-lite -b 0.0.0.0 -p 3000
Use multiple JRuby runtimes for non-threadsafe applications
torquebox-lite --min-runtimes=3 --max-runtimes=5
Get a listing of all torquebox-lite options
Get in touch with us via the regular TorqueBox community channels - IRC, mailing lists, or Twitter.
Found a bug? Have a suggestion?
Because TorqueBox Lite has a separate release cycle and codebase from TorqueBox itself, please use GitHub Issues to file bugs and feature requests instead of the TorqueBox JIRA.
Want to contribute?
Pull requests are more than welcome. There are really just two Ruby files that contain the majority of the code.
build/assembly/bin/assemble.rb - Transform the stock TorqueBox distribution into our slimmed down version
gems/torquebox-lite/bin/torquebox-lite - The
torquebox-litecommand which boots TorqueBox Lite
Building TorqueBox Lite requires Maven 3. From the project's root
directory, just run