Demo Rails application running on JRuby with Vert.x (vrtx@rails). It shows a classic Rails 4.2 app served through the Vert.x/JRuby stack instead of a traditional Ruby app server.
- Rails 4.2.7.1 (see
Gemfile) - JRuby on the JDK, from the
jruby:9.1.2.0-jdkimage inDockerfile.vertx.dev - Vert.x with Hazelcast clustering options in
config_host.rbandaws-default-cluster.xml - PostgreSQL via
activerecord-jdbcpostgresql-adapteron JRuby, plus a local Redis server in the dev image
The dev image exposes port 3000:
docker build -f Dockerfile.vertx.dev -t vrtx-rails-demo .
docker run -p 3000:3000 vrtx-rails-demoThen open http://localhost:3000.
You need JRuby with a JDK, Bundler, PostgreSQL, and Redis:
bundle install
bundle exec rails serverThe Rails test suite lives under test/ (controllers, fixtures, helpers, and integration). Run it with:
bundle exec rake testREADME.rdocis the stock Rails readme template.- Cluster host settings are generated in
config_host.rb; adjust them before any clustered or AWS deployment.