Develop grails applications collaboratively on the cloud with Nitrous.IO

Nitrous.IO is a cloud-based development environment.

With Nitrous, you are able to write and store your application development online and access it on the go at shared office machines, on your iPad or Chromebook.

Another cool feature is the ability to work on files together via collaborative mode with other developers. In this mode, any changes and selections you make in your IDE get sent to the other people working with you.

As of this writing, Nitrous does not have native support for Grails. But you are able to build and run grails applications given that it provides a full linux command line.

In this post, I will show you how to build and deploy a Grails application on Nitrous.

First, you need a Nitrous account. If you’re thinking about it, you can get one by clicking on my referral link –

Create a new box

Once you have logged in, you will need to provision a new box. Click on Boxes on the menu area and select a new box.

Screen Shot 2013-07-03 at 13.39.05

After a few minutes, you should see a brand new box provisioned for you. You should see a screen with an empty workspace as such:

Screen Shot 2013-07-03 at 13.40.50

Notice the console at the bottom. Unlike Cloud9, this is a full linux console.

You can also ssh to the box using your favourite client.

Install Grails

The next step is to get Grails installed in your local box. You can do this by using the GVM tool.

Type the following into the console:

curl -s | bash
 source "/home/action/.gvm/bin/"
 gvm install grails

This should download the latest version of Grails.

Creating your application

In the console, type

grails create-app mySampleApp

this should create a full Application you can edit and play with.

Editing your Application

You should be able to refresh your workspace and see your grails application laid out. To edit your application, just click on the file you are interested in.

Screen Shot 2013-07-03 at 13.46.42

I found that you can get pretty far by selecting the file type to be Java.

Running your Application

To run your application, simply type in your console

grails rA

Your grails application should run on port 8080. In the toolbar, you can click on Preview, which will lead you to an url like . You can either change your app context to / or add mySampleApp/ to your url ( ) to see your running grails application.

The simplest way to do this is to pass in the right host and port number to your grails app:

grails'/' -Dgrails.server.port=8080 run-app

Collaboration Mode

One of the best features of Nitrous is the ability to collaboratively work on the same file with another person. You can use the toolbar to invite other users in the system to join your project.

This feature is best explained here –

Running Functional Tests

One thing to note is that you might want to use a remote testing tool like Sauce Labs to see the results of your functional tests ran in this cloud environment.

7 thoughts on “Develop grails applications collaboratively on the cloud with Nitrous.IO

  1. rob (@robpatrick)

    Thanks for the post, I was really excited by this idea so tried to give it a go. I followed the instructions, but every time I try and run the app I get this:

    action@grailsbox-13465:~/mysampleapp$ grails rA
    | Installed plugin database-migration-1.3.2…..

    I can’t see anything in the logs. Have you seen this before?


    1. Tomas Lin Post author

      I logged into the box you shared and your settings seem to be the same and the one I have. I did see process killed with grails 2.3.0.M2 but attributed that to fork mode issues. There might be differences between environments, I am able to work perfectly fine in USA East. Have you tried terminating your current box and trying it in US East?

      1. Tomas Lin Post author

        This is most definitively a memory issue. If I create a box with 600mbs of memory and run grails, it will get killed. But when I call export GRAILS_OPTS=”-XX:MaxPermSize=384m -Xmx384M -server” and then run the app via grails -Dapp.context=/ run-app, everything works fine.

  2. thiagoponte

    Many thanks! I managed to run Grails in my Nitrous IO box here.
    The console gave the following errors, but the application ran fine:

    My box is a Ruby/Rails with 640MB RAM and 750MB HDD.
    I just entered: “grails rA” into console after manually creating a domain class and a controller with dynamic scaffolding.

  3. Pingback: Install Grails |

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s