java > 1.4.2 (depends on the jruby version, newer verions need java1.6)
optional: jruby from http://jruby.org
the whole readme will use MRI but you can use jruby anytime.
gem install ruby-maven
now there is a
rmvn command available.
from rails point of view you just take the rails/rake commands and prefix them with
rmvn and a
any rmvn command will place the gems for the application in the directory target/rubygems which is set as GEM_HOME and GEM_PATH by the
when the PATH set is set to
then you can use
rspec in the context of the application, i.e. gems are managed by bundler and jars are managed by ruby-maven. when you do not set the PATH then you need to prefix
rmvn in front of those commands
rmvn rspec, etc
NOTE some older versions of jruby has a bug which does not obey relative path-entries in PATH.
now we need to run
rmvn bundle install
NOTE running maven the first times takes some time. installing rubygems via maven takes a long time on the first run. so just be patient !
the above installs all gem with platform java - this is needed to run gwt shell. to intall the MRI gems just run
again. now you can setup the database
the root user has no password yet, but with the reset password by email on the login screen you can get a password - in development mode the email gets printed out in the console log.
for each user you can reset the password via the login screen and see it inside the email which gets dump into the rails output.
no need for compilation just start the server and developement shell with
now you can launch a browser directly from that shell. the first time the browser ask to install a gwt-plugin for your browser, after that the application will start up.
first you need to compile the GWT application by
then you can start the server
to start the GUI:
as example an account with a name attribute:
rails generate scaffold account name:string --optimistic --modified_by
note: the optimistic option will add optimistic transactions to the controller using the updated_at timestamp of the model. the modified_by option will add a reference to each record to the last user modified the record and the respective controller code.
after added a new resource (model) you need to update the database:
and most likely you need to restart the server (at least for GWT part).
the GWT url for that new model you get by adding
#accounts:new to the url which gets started by GWT development shell (with default port):
all controllers will also generate xml and json views (when there a valid session cookie, i.e. first login in the GWT GUI):
note: to use the new resource with webrick you need to compile it first with
each user belongs to none, one or more groups. for each action on the controller you can declare the allowed groups. for the acount from the example above the guard declaration is in: