Installing a Grails Development Environment on Linux


In this Grails Example, we will set up our development environment on a Linux system.

Video #6 shows how to install Grails and Java on Linux

Learn about the new Grails Academy magazine

Video #7 shows how to install Eclipse and the Grails extensions on Linux

Learn about the new Grails Academy magazine

16 thoughts on “Installing a Grails Development Environment on Linux

    • I haven’t tried it, but with a bash shell, you should be able to install a development environment the same as what I show in the tutorials. As a production server, Red Hat is a very solid JVM platform.
      ~Mike

  1. After trying to set grails sometime back 8 month ago, ran into bunch of errors. (used ubuntu 13) Tried it again with the latest 2.3.6 version and work perfectly, no errors. Thanks for restablish my trust.

  2. Nice job on latest grails.
    I gave it a shot on Ubuntu12 or 13 sometime back and ran into many issues and gave up.(just did not want to spent a lot of time) moved back to django.
    Now I tried the lates version 2.3.6 and everything was working perfectly.
    I used gvm as installer. thanks for fixing bugs I think many people will like to use this in such a shape.

  3. I tried this on 4 different ubuntu machines and ran into many problems along the way. On 10.10 the repo is no longer supported. On 12.04 among many problems the JAVA_HOME was NOT set, and after chatting on IRC, I was told that STS was buggy and not to use it at all, then I was told later that I needed STS… Ahh 2 days work, and 0 for 4 machines… I think I will go back to Perl::Dancer with JEdit…

    • Thanks for catching that. I’m updating the install videos for Grails 2.2, and I’ll be sure to create a new Ubuntu virtual machine based on the latest release.

    • In my case, I already had the jdk intesllad and the error still occurred. To fix the problem I changed the Path environment variable and moved %JAVA_HOME%\bin to the beginning of the Path.

  4. Nice video and helpful tutorial,
    I am running ubuntu 12 and I want to install Grails using Sun JDK instead of OpenJDK, because some of other projects require Sun JDK and things don’t work well when I have Open JDK as default.
    I have Sun JDK 1.7 installed already and working fine. Is there anyway to install grails from command-line using JDK 1.7?

  5. Hi Mike,
    Nice videos & tutorial. One little issue regarding the grails install on ubuntu, I had to additionally install openjdk-7-jdk on my 11.10 before the demo would run on a browser. sudo apt-get install openjdk-7-jdk

    Best.

    • Sean:

      That’s good to know. I always assumed that Ubuntu came with the JDK pre-installed. I’ll add that to the post.

      Mike

    • Can you paste the output of set’ coamnmd somewhere(e.g. rafb.net/paste) and provide the link here? Open the coamnmd prompt and run the set coamnmd in it. I am pasting part of the output generated on my machine. Notice the paths set for JAVA_HOME, GROOVY_HOME, GRAILS_HOME and also the paths included in PATH variable.C:\> setALLUSERSPROFILE=C:\ProgramDataAPPDATA=C:\Users\tabrez\AppData\RoamingAPR_ICONV_PATH=C:\Program Files (x86)\Subversion\CLASSPATH=.;C:\Program Files (x86)\Java\jdk1.6.0_6)\Java\jre1.6.0_06\lib\ext\QTJava.zipCommonProgramFiles=C:\Program Files\Common FilesCommonProgramFiles(x86)=C:\Program Files (x86)\CoCOMPUTERNAME=TABREZ-PCComSpec=C:\Windows\system32\cmd.exeDFSTRACINGON=FALSEFP_NO_HOST_CHECK=NOGRAILS_HOME=c:\grailsGROOVY_HOME=C:\groovyHOMEDRIVE=C:HOMEPATH=\Users\tabrezJAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_06[…]Path=c:\ruby\bin;C:\Windows\system32;C:\Program Files (x86)\MySQL\MySQL Server 5.0\bin;C:\Program Files (x86)\Subversion\bin;C:\Program Files (x86)\Java\jdk1.6.0_06\bin;C:\groovy\bin;c:\grails\bin;You can also try to see if proper version information is printed by running java -v, groovy -v and grails -v coamnmds. If all the paths are set properly, what error do you get when you try to create a grails application?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>