{"id":5028,"date":"2021-03-13T05:47:34","date_gmt":"2021-03-13T05:47:34","guid":{"rendered":"https:\/\/linuxways.net\/?p=5028"},"modified":"2021-03-17T04:10:36","modified_gmt":"2021-03-17T04:10:36","slug":"install-ruby-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/install-ruby-on-ubuntu-20-04\/","title":{"rendered":"Install Ruby on Ubuntu 20.04"},"content":{"rendered":"<h2>Introduction:<\/h2>\n<p>Ruby is a high-level programming language developed in the mid-90s. It also supports functional and object-oriented programming. Ruby and Ruby on Rails differ from each other in a sense that the former one is a general-purpose programming language whereas the latter one is a web-based framework. Today, we will learn to install Ruby on a Ubuntu 20.04 system.<\/p>\n<h2>Method of Installing Ruby on Ubuntu 20.04:<\/h2>\n<p>For installing the latest available and compatible version of Ruby on your Ubuntu 20.04 system, following steps should be performed:<\/p>\n<h3>Step # 1: Perform Ubuntu 20.04 System Cache\u2019s Update:<\/h3>\n<p>We need to update our Ubuntu 20.04 system\u2019s cache by executing the command shown below:<\/p>\n<pre><strong>$ sudo apt-get update<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"448\" height=\"25\" class=\"wp-image-5029\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-133.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-133.png 448w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-133-300x17.png 300w\" sizes=\"auto, (max-width: 448px) 100vw, 448px\" \/><\/strong><\/p>\n<p>Once the system update will complete successfully, your Ubuntu 20.04 system will display the following messages on the terminal:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"715\" height=\"530\" class=\"wp-image-5030\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-134.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-134.png 715w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-134-300x222.png 300w\" sizes=\"auto, (max-width: 715px) 100vw, 715px\" \/><\/p>\n<h3>Step # 2: Install the Latest Compatible Version of Ruby on your Ubuntu 20.04 System:<\/h3>\n<p>Now, we need to install the latest available and compatible version of Ruby on our Ubuntu 20.04 system with the command shown below:<\/p>\n<pre><strong>$ sudo apt install ruby-full<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"513\" height=\"27\" class=\"wp-image-5031\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-135.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-135.png 513w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-135-300x16.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-135-501x27.png 501w\" sizes=\"auto, (max-width: 513px) 100vw, 513px\" \/><\/strong><\/p>\n<p>Once the execution of Ruby will complete on our Ubuntu 20.04 system, the following messages will be displayed on the terminal:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"537\" height=\"493\" class=\"wp-image-5032\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-136.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-136.png 537w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-136-300x275.png 300w\" sizes=\"auto, (max-width: 537px) 100vw, 537px\" \/><\/p>\n<h3>Step # 3: Verify the Successful Installation of Ruby on your Ubuntu 20.04 System:<\/h3>\n<p>You can even verify the successful installation of Ruby on your Ubuntu 20.04 system by checking its version with the command shown below:<\/p>\n<pre><strong>$ ruby --version<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"403\" height=\"29\" class=\"wp-image-5033\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-137.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-137.png 403w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-137-300x22.png 300w\" sizes=\"auto, (max-width: 403px) 100vw, 403px\" \/><\/p>\n<p>The version of Ruby installed on our Ubuntu 20.04 system is <strong>2.7.0<\/strong> as shown in the following image:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"592\" height=\"66\" class=\"wp-image-5034\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-138.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-138.png 592w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-138-300x33.png 300w\" sizes=\"auto, (max-width: 592px) 100vw, 592px\" \/><\/p>\n<h2>Method of Removing Ruby from Ubuntu 20.04:<\/h2>\n<p>For removing Ruby from your Ubuntu 20.04 system, you have to execute the command shown below:<\/p>\n<pre><strong>$ sudo apt-get purge ruby<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"489\" height=\"29\" class=\"wp-image-5035\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-139.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-139.png 489w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-139-300x18.png 300w\" sizes=\"auto, (max-width: 489px) 100vw, 489px\" \/><\/p>\n<p>This command will remove Ruby and its configuration files from your Ubuntu 20.04 system as shown in the following image:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"716\" height=\"477\" class=\"wp-image-5036\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-140.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-140.png 716w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-140-300x200.png 300w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/><\/p>\n<p>Now, you can also remove the irrelevant packages and dependencies from your Ubuntu 20.04 system for freeing up the occupied space with the command shown below:<\/p>\n<pre><strong>$ sudo apt-get autoremove<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"488\" height=\"26\" class=\"wp-image-5037\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-141.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-141.png 488w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-141-300x16.png 300w\" sizes=\"auto, (max-width: 488px) 100vw, 488px\" \/><\/strong><\/p>\n<p>Running this command will free up a significant amount of your Ubuntu 20.04 system\u2019s space as shown in the following image:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"718\" height=\"531\" class=\"wp-image-5038\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-142.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-142.png 718w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-142-300x222.png 300w\" sizes=\"auto, (max-width: 718px) 100vw, 718px\" \/><\/p>\n<h2>Conclusion:<\/h2>\n<p>In this article, we threw light on the method of installing Ruby on a Ubuntu 20.04 system. Also, if you want to remove this programming language from your Ubuntu 20.04 system, then you can also do this by the method that we have shared with you in the last section of our article.<\/p>","protected":false},"excerpt":{"rendered":"<p>Introduction: Ruby is a high-level programming language developed in the mid-90s. It also supports functional and object-oriented programming. Ruby and Ruby on Rails differ from each other in&hellip;<\/p>","protected":false},"author":1,"featured_media":5196,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[216],"class_list":["post-5028","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu","tag-ruby"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/5028","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=5028"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/5028\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/5196"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=5028"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=5028"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=5028"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}