
INSTALL GRAILS FROM SCRATCH IN UBUNTU 14.04 LTS
Grails is an open-source web development framework, based on the Groovy programming language (which runs on the Java platform), so, to begin you will need the followings prerequisites:
- Install java development kit (JDK)
1sudo apt-get install openjdk-6-jdk
(We’ll install version 6 of the OpenJDK for maximum compatibility with Grails.) - Then, we need to install cURL in our OS.
1sudo apt-get install curl - Once we have installed jdk and cURL, we are able to install Grails. To do so, lets install sdkman (SDK Manager). Note: You can see that in other tutorials called gvm, because it was renamed.
1curl -s "https://get.sdkman.io" | bash - To finish the sdkman installation, it will ask you to run the following shell script.
1source "$HOME/.sdkman/bin/sdkman-init.sh" - After that, then finally install Grails itself. To install the latest version of Grails simply run:
1sdk install grails
or if you need an older version:
1sdk install grails 2.5.6 - Whenever it has finished, you will be able to try your installation:
1234cd /path/to/your/local/repo/mkdir grailsprojectcd grailsprojectgrails create-app grailsproject
Then, enter the newly-created project directory and run it:
12cd grailsprojectgrails run-app
After installing all dependencies, it will show you a local url like the following where you will be able to see the default Grails application:http://YOUR_LOCAL_IP:8080/grailsproject
You have successfully installed Grails for your development environment!
Note: If you want to change between different Grails versions you can do the following:
1 sdk use grails 2.1.1
Moreover, if you want to check which one is your current Grails version, lets use the following command:
1 sdk current grails