It's been a couple of years since I did a fresh install of Ubuntu and my Grails development environment. This post provides a walk-though of the steps to install Grails and Intellij Idea on ubuntu 13.04. I'm using Xubuntu, Grails 2.2.3, Intellij Idea 10 (with Groovy & Grails support).
As I've written before, I'm not a big fan of the new Ubuntu Unity interface nor Gnome 3 so after reading Chris Hoffman's post on Unity Alternatives, I've chosen to install Xubuntu based on the Ubuntu 13.04 release.
Running the Ubuntu Software Center, I installed the following packages:
Chrome OpenJDK Java 6 Runtime MySQL Server php5-mysql phpmyadmin GNU Emacs FileZilla Git
While I've been a longtime Emacs user, I've also started using Sublime Text so I install it from the website.
Git is not required for this configuration but I've become a fan of git for version control and you can find a good description of using git with Grails here.
$ git config --global user.name "YOUR NAME" $ git config --global user.email "YOUR EMAIL" $ git config --list
As of this writing, I have not been able to complete the package manager based install because of failures in the gradlew build steps. Instead, I've been using the pre-built package install described in the next section.
Install grails using the ubuntu package manager:
sudo add-apt-repository ppa:groovy-dev/grails sudo apt-get update sudo apt-get install grails-ppa
As of this writing, there is no Grails package in the repository for Ubuntu 13.04 so the install fails. To work around this, I changed the strings raring in the following two files to precise:
I then re-ran the following commands:
sudo apt-get update sudo apt-get install grails-ppa
Log out and then back on again. Test your install by entering the grails command and you should see results similar to this.
$ grails -version Grails version: 2.1.1
To complete the test of your install try this:
$ cd test $ grails run-app Server running. Browse to http://localhost:8080/test
Go to the Intellij Idea download page and download Idea.
$ cd $HOME
$ tar xvfz ~/Downloads/ideaIU*gz
$ cd idea-IU*/bin
$ sudo ./idea.sh
I also set the preferred web browser to Chrome at File > Settings > Web Browsers
Go to the SmartGIT download page and download the application.
$ cd $HOME
$ tar xvfz ~/Downloads/smartgit*gz
To run SmartGIT, execute the command:
I've been using CloudFoundry as a Grails/Java PaaS provider for the past two years during their free beta period and have been very happy with the service. It's no longer free from VMware but AppFog has a free tier.
The AppFog af utility is needed to push Grails updates to AppFog and perform other administrative functions on your AppFog instance - stop, start and check on the status of your application and its' log files.
Here are the commands required to install their af utility:
$ gem install af $ af target api.appfog.com $ af login <login-id>
Misc Ubuntu Utilities
The Synaptic Package Manager:
$ sudo apt-get install synaptic
Disable overlay scroll bars:
$ sudo apt-get remove overlay-scrollbar liboverlay-scrollbar3-0.2-0 liboverlay-scrollbar-0.2-0
As a newbie to the ubuntu/Debian package manager, thanks to Matthew Danish for his APT and DPKG Quick Reference.
To list all installed packages: dpkg --get-selections
To list the files that are in a specific package: dpkg -L To list info about a specific package: dpkg -s
Using Git with Grails - http://www.grails.org/plugin/git
Updates from the original posting -
Oct 28, 2011: Added mysql and phpmyadmin install step.
Oct 30, 2011: Added Grails MySQL & Hibernate section.