{"id":14069,"date":"2014-06-06T18:45:31","date_gmt":"2014-06-06T13:15:31","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=14069"},"modified":"2015-07-06T13:38:50","modified_gmt":"2015-07-06T08:08:50","slug":"managing-parallel-versions-of-multiple-grails-sdksoftware-development-kits-on-unix-based-systems-by-gvm","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/managing-parallel-versions-of-multiple-grails-sdksoftware-development-kits-on-unix-based-systems-by-gvm\/","title":{"rendered":"Managing parallel versions of multiple Grails SDK(Software Development Kits) on Unix based systems by GVM"},"content":{"rendered":"<p style=\"margin-bottom: 0cm; font-weight: normal;\"><span style=\"font-size: medium;\">S<\/span><span style=\"font-size: medium;\">ometimes we face a problem with our grails system, means we have many applications to work with which are built using <\/span><a href=\"http:\/\/www.tothenew.com\/grails-application-development\"><span style=\"font-size: medium;\">different grails versions<\/span><\/a><span style=\"font-size: medium;\">. So switching between grails version is a <\/span><span style=\"font-size: medium;\"><b>ter<\/b><\/span><span style=\"font-size: medium;\"><b>r<\/b><\/span><span style=\"font-size: medium;\"><b>ible task,<\/b><\/span><span style=\"font-size: medium;\"> like <\/span><span style=\"font-size: medium;\"><b>switching symbolic links<\/b><\/span><span style=\"font-size: medium;\"> or changing <\/span><span style=\"font-size: medium;\"><b>GRAILS_HOME<\/b><\/span><span style=\"font-size: medium;\"> environment variable each time when we run our different application. <\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin-bottom: 0cm; font-weight: normal;\"><span style=\"font-size: medium;\"><strong>How can we solve it?<\/strong><b>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/b><\/span><\/p>\n<p style=\"margin-bottom: 0cm; font-weight: normal;\"><span style=\"font-size: medium;\">The best way which i found<span style=\"font-size: medium;\"> is <\/span><span style=\"font-size: medium;\"><b>GVM<\/b><\/span><span style=\"font-size: medium;\">, which stands for <\/span><span style=\"font-size: medium;\"><b>Groovy enVironment Manager<\/b><\/span><span style=\"font-size: medium;\">. This is a tool to manage <\/span><span style=\"font-size: medium;\">various <\/span><span style=\"font-size: medium;\">version<\/span><span style=\"font-size: medium;\">s <\/span><span style=\"font-size: medium;\">of <\/span><span style=\"font-size: medium;\">different<\/span><span style=\"font-size: medium;\"> service<\/span><span style=\"font-size: medium;\">s <\/span><span style=\"font-size: medium;\">e.g., <\/span><span style=\"font-size: medium;\"><b>Grails, <\/b><\/span><span style=\"font-size: medium;\"><b>G<\/b><\/span><span style=\"font-size: medium;\"><b>roovy<\/b><\/span><span style=\"font-size: medium;\"> etc.<\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin-bottom: 0cm; font-weight: normal;\"><strong><span style=\"font-size: medium;\">Here I&#8217;ll talk about steps to use GVM to make your life more ease.<\/span><\/strong><\/p>\n<p style=\"margin-bottom: 0cm; font-weight: normal;\"><span style=\"font-size: medium;\"><b>1. <\/b><\/span><span style=\"font-size: medium;\"><span style=\"font-weight: normal;\">You can install gvm by using <\/span><\/span><span style=\"font-size: medium;\"><b><strong>&#8220;curl -s get.gvmtool.net | bash<\/strong><\/b><\/span><span style=\"font-size: medium;\"><b>\u201d. <\/b><\/span><span style=\"font-size: medium;\"><br \/>\nThis command will create a .gvm folder on your machine inside <\/span><span style=\"font-size: medium;\">your<\/span><span style=\"font-size: medium;\"> home directory. And download<\/span><span style=\"font-size: medium;\">s<\/span><span style=\"font-size: medium;\"> all necessary files for execution of gvm commands<\/span><span style=\"font-size: medium;\">.<br \/>\n<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin-bottom: 0cm; font-weight: normal;\"><span style=\"font-size: medium;\"><strong>Note:<\/strong> By use of <\/span><span style=\"font-size: medium;\"><strong>&#8220;gvm help&#8221;<\/strong><\/span><span style=\"font-size: medium;\">. You can check GVM install or not.<\/span><\/p>\n<p style=\"margin-bottom: 0cm; font-weight: normal;\"><span style=\"font-size: medium;\"><b>2. <\/b><\/span><span style=\"font-size: medium;\">You can use <\/span><span style=\"font-size: medium;\"><b><strong>\u201cgvm install grails\u201d<\/strong><\/b><\/span><span style=\"font-size: medium;\"> for installation of latest version of Grails<\/span><span style=\"font-size: medium;\">. If you want to install Grails 2.3.7 version than you can use <\/span><span style=\"font-size: medium;\"><b><strong>\u201cgvm install grails 2.3.7\u201d<\/strong><\/b><\/span><span style=\"font-size: medium;\">. W<\/span><span style=\"font-size: medium;\">hat will <\/span><span style=\"font-size: medium;\">it<\/span><span style=\"font-size: medium;\"> do? It will download and install necessary binary file <\/span><span style=\"font-size: medium;\">of your selected grails version<\/span><span style=\"font-size: medium;\"> in to .gvm folder.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin-bottom: 0cm; font-weight: normal;\"><strong><span style=\"font-size: medium;\"><strong>Note:<\/strong><\/span><\/strong><span style=\"font-size: medium;\"> It will prompt you to choos<\/span><span style=\"font-size: medium;\">e<\/span><span style=\"font-size: medium;\"> current install<\/span><span style=\"font-size: medium;\">ed<\/span><span style=\"font-size: medium;\"> version as a default Grails version, or you can decide later by using <\/span><b><\/b><span style=\"font-size: medium;\"><b><strong>&#8220;gvm default grails 2.3.7&#8221;<\/strong><\/b><\/span><b><\/b><span style=\"font-size: medium;\"> command.<\/span><\/p>\n<p style=\"margin-bottom: 0cm; font-weight: normal;\"><span style=\"font-size: medium;\"><b>3. <\/b><\/span><span style=\"font-size: medium;\">Y<\/span><span style=\"font-size: medium;\">ou can switch grails version very easily by <\/span><span style=\"font-size: medium;\"><b><strong>\u201cgvm use grails 2.2.2\u201d<\/strong><\/b><\/span><span style=\"font-size: medium;\"> command.<\/span><\/p>\n<p style=\"margin-bottom: 0cm;\"><b><span style=\"font-size: medium;\">4. <\/span><\/b><span style=\"font-size: medium;\"><span style=\"font-weight: normal;\">Finally,<\/span><\/span><span style=\"font-size: medium;\"><span style=\"font-weight: normal;\"> run your application.<\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin-bottom: 0cm;\"><strong><span style=\"font-size: medium;\">Some Important commands for GVM are as following . \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0 <\/span><\/strong><\/p>\n<p style=\"margin-bottom: 0cm;\"><strong>1.<\/strong> To uninstall Grails 2.2.2,\u00a0 you use<strong> &#8220;gvm uninstall grails 2.2.2&#8221;<\/strong>.<\/p>\n<p style=\"margin-bottom: 0cm;\"><strong>2.<\/strong> To check, list of install services on your machine by using<strong>&#8220;gvm current&#8221;<\/strong> command.<\/p>\n<p><strong>3.<\/strong> To check, Grails available version on your machine by using <strong>&#8220;gvm current grails&#8221;<\/strong><span style=\"font-weight: normal;\">command.<\/span><br \/>\n<strong>4.<\/strong> To check GVM version by using <strong><span style=\"font-size: medium;\">&#8220;gvm version&#8221; <\/span><\/strong><span style=\"font-weight: normal;\">command.<\/span><\/p>\n<p style=\"margin-bottom: 0cm;\"><strong>Note:\u00a0<\/strong><span style=\"font-size: medium;\">This is an example of Grails. It supports Groovy, Gaiden, Griffon, Gradle etc.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes we face a problem with our grails system, means we have many applications to work with which are built using different grails versions. So switching between grails version is a terrible task, like switching symbolic links or changing GRAILS_HOME environment variable each time when we run our different application. &nbsp; How can we solve [&hellip;]<\/p>\n","protected":false},"author":122,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":4},"categories":[7],"tags":[4840,9],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/14069"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/122"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=14069"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/14069\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=14069"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=14069"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=14069"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}