{"id":3707,"date":"2023-04-05T17:08:25","date_gmt":"2023-04-05T17:08:25","guid":{"rendered":"https:\/\/geekmungus.co.uk\/?p=3707"},"modified":"2023-04-05T17:09:08","modified_gmt":"2023-04-05T17:09:08","slug":"installing-a-specific-ruby-version","status":"publish","type":"post","link":"https:\/\/geekmungus.co.uk\/?p=3707","title":{"rendered":"Installing a Specific Ruby Version"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">We needed to install Ruby 2.7 instead of what normally comes with Ubuntu 20.04 LTS, if we installed a later than 2.7 Ruby version, the particular application (i.e. Staytus in this case) would barf.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The nice people at BrightBox have created some packaged installs of Ruby at various versions.<br><a rel=\"noreferrer noopener\" href=\"https:\/\/www.brightbox.com\/docs\/ruby\/ubuntu\/#adding-the-repository\" target=\"_blank\">https:\/\/www.brightbox.com\/docs\/ruby\/ubuntu\/#adding-the-repository<\/a><br><a rel=\"noreferrer noopener\" href=\"https:\/\/launchpad.net\/~brightbox\/+archive\/ruby-ng\" target=\"_blank\">https:\/\/launchpad.net\/~brightbox\/+archive\/ruby-ng<\/a> (Latest version supported 20.04)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We first install some common packages, then add the Brightbox repo.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install software-properties-common\nsudo apt-add-repository ppa:brightbox\/ruby-ng\nsudo apt-get update<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now we install Ruby 2.7, chances are you want the -dev packages as well.<\/p>\n\n\n\n<pre id=\"code-9\" class=\"wp-block-code\"><code>sudo apt-get install ruby2.7\nsudo apt-get install ruby2.7-dev<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We then need to install some specific Gems to Ruby to give us additional libraries, these are required for the particular application, if you don&#8217;t need these, you don&#8217;t need to install them!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Notice we are running &#8220;gem2.7&#8221; which is the correct version for the version of Ruby we want to use. Also notice we need specifically bundler 1.17.2, if we don&#8217;t have this version the Staytus installer later will fail.<\/p>\n\n\n\n<pre id=\"code-10\" class=\"wp-block-code\"><code>sudo gem2.7 install bundler \nsudo gem2.7 install procodile\nsudo gem2.7 install bundler:1.17.2<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>We needed to install Ruby 2.7 instead of what normally comes with Ubuntu 20.04 LTS, if we installed a later than 2.7 Ruby version, the particular application (i.e. Staytus in this case) would barf. The nice people at BrightBox have created some packaged installs of Ruby at various versions.https:\/\/www.brightbox.com\/docs\/ruby\/ubuntu\/#adding-the-repositoryhttps:\/\/launchpad.net\/~brightbox\/+archive\/ruby-ng (Latest version supported 20.04) We first &#8230; <a title=\"Installing a Specific Ruby Version\" class=\"read-more\" href=\"https:\/\/geekmungus.co.uk\/?p=3707\" aria-label=\"Read more about Installing a Specific Ruby Version\">Read more<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,20],"tags":[],"class_list":["post-3707","post","type-post","status-publish","format-standard","hentry","category-linux","category-random"],"_links":{"self":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/3707","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3707"}],"version-history":[{"count":2,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/3707\/revisions"}],"predecessor-version":[{"id":3709,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/3707\/revisions\/3709"}],"wp:attachment":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3707"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}