0

I am new in Linux. I am using Ubuntu to install Grails. I am following this command --

sudo add-apt-repository ppa:groovy-dev/grails
sudo apt-get update
sudo apt-get install grails-ppa

But When I try to install Grails 2.2.3 it automatically load 2.1.2 version.

sudo apt-get install grails 2.2.3

When I run this command, it install grails 2.1.2 version. I am not getting any idea how to upgrade my grails version to 2.2.3.

I am using java-6-openjdk-amd64 because java-7 is giving H2 db error with grails 2.1.2

Please help...

Free-Minded
  • 5,322
  • 6
  • 50
  • 93
  • 1
    You may use oracle-jdk instead of openjdk and gvmtool – uladzimir Jul 19 '13 at 13:52
  • Yes May be you are right because When I am using gvm tool to upgrade my grails to 2.2.3 then its not working with both `java-6-openjdk-amd64` and `java-7-openjdk-amd64`. Showing same error `Could not determine Hibernate dialect for database name [H2]!`. I will try to change my java to oracle-jdk. – Free-Minded Jul 20 '13 at 11:50
  • I installed `oracle jdk-7u25-linux-x64.tar.gz` and it works fine with `Grails 2.2.3`. I am surprised why `Open-JDK7` does not work with `Grails 2.2.3`. Anyway Now I am not getting `Could not determine Hibernate dialect for database name [H2]!` error. Check [here](http://askubuntu.com/questions/55848/how-do-i-install-oracle-java-jdk-7) to install `Oracle JDK 7` – Free-Minded Jul 22 '13 at 08:14
  • Another time you can use ppa with oracle jdk https://launchpad.net/~webupd8team/+archive/java http://www.unixmen.com/howto-install-oracle-java-7-jdk-jre-in-ubuntu-12-10-quantal-quetzal-ppa/ It is more simple :) – uladzimir Jul 22 '13 at 08:54
  • @baxxabit, yes PPA is also a good way to download oracle jdk. – Free-Minded Jul 22 '13 at 09:59

2 Answers2

6

Install GVM

sudo apt get install curl 

curl -s get.gvmtool.net | bash

restart terminal , then :

gvm install grails 2.2.3
gvm use grails 2.2.3

if you want permanently use a version, instead of gvm use run gvm default ;

gvm default grails 2.2.3
Abdennour TOUMI
  • 87,526
  • 38
  • 249
  • 254
3

It appears that the PPA currently (19th July 2013) only goes up to 2.2.0. If you want a later version you'll need to download the standard zip distribution or use a tool like GVM rather than installing using apt-get.

Ian Roberts
  • 120,891
  • 16
  • 170
  • 183
  • I am completely new to Linux. Can Grails Zip works in Linux if I set environment variable ??? – Free-Minded Jul 19 '13 at 10:15
  • And How to uninstall grails-ppa and my all old version grails ?? – Free-Minded Jul 19 '13 at 10:29
  • 1
    @ShreshttBhatt Grails will work fine if you simply unpack the zip file, add the grails `bin` directory to your `PATH` and make sure `JAVA_HOME` is set correctly. A simple `apt-get remove grails` should be enough to uninstall the PPA version if you need to, but there's no reason why you can't have several different versions of Grails installed at the same time for different applications as long as you run the right version for each app. This is what GVM helps automate. – Ian Roberts Jul 19 '13 at 11:32
  • Can you check my another Stack-overflow [Question](http://stackoverflow.com/questions/17547949/grails-send-mail-is-not-working) ?? – Free-Minded Jul 19 '13 at 11:38
  • Yes, the PPA is deprecated in favor of GVM. GVM does this quite well and cross platform. – Colin Harrington Feb 26 '14 at 17:03