ruby-gradle-example/README.md

37 lines
868 B
Markdown
Raw Permalink Normal View History

2014-07-25 20:52:45 +00:00
# Ruby + Gradle Example
This project relies heavily on the marvelous [TorqueBox Rubygems Maven
repo](http://rubygems-proxy.torquebox.org/) and my own
[jruby-gradle-plugin](http://plugins.gradle.org/plugin/com.lookout.jruby)
## Usage
In order to prepare the dependencies for the JRuby application you must invoke
gradle:
2014-07-25 23:51:51 +00:00
```bash
% ./gradlew jrubyWar
2014-07-25 23:51:51 +00:00
```
This will do a few things:
1. Resolve Ruby gem dependencies
1. Resolve Java dependencies
1. Extract Ruby gems into `vendor/`
1. Cache jars into `.jarcache/` (for easily referencing at JRuby interpreter runtime)
2014-07-28 23:18:47 +00:00
1. Create a runnable `.war` of what's in `src/main/webapp`
2014-07-28 23:18:47 +00:00
### Running locally
```bash
% PATH=./vendor/bin:$PATH GEM_HOME=./vendor rackup src/main/webapp/WEB-INF/config.ru
2014-07-28 23:18:47 +00:00
```
2014-07-28 23:45:29 +00:00
## Requirements
* JRuby (for one form of local development)
* Rubygems (`gem`) for extracting gems
* Java 7