jruby-sinatra-template
is a Leiningen template for
Sinatra web applications that run primarily on the Jruby platform.
You will need to install Leiningen to use the template. Installation instruction can be found here
Once you have leiningen installed and in your $PATH
,
then you'd need to add the following to ~/.lein/profiles.clj
{:user {:plugins [[jruby-sinatra/lein-template "0.1.0"]]}}
# Create a new project
lein new jruby-sinatra my-new-web-app
# Resolve all dependencies (java + ruby)
cd my-new-web-app && lein do clean, deps && bundle install
$ tree -a
.
├── .gitignore
├── .pryrc
├── .ruby-gemset
├── .ruby-version
├── Gemfile
├── Gemfile.lock
├── README.md
├── Rakefile
├── app
│ ├── application_controller.rb
│ └── init.rb
├── config
│ └── warble.rb
├── config.ru
├── jars
│ ├ ...
│
├── project.clj
└── target
└ ...
lein clean
lein do clean, deps
jruby -S bundle install --without nothing --no-deployment
jruby -S bundle install --deployment --binstubs --without development test
rackup [-p <your port>]
jruby -S bundle exec warble
Copyright © 2014 Aditya Rao
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.