The Ruby Bundler streamlines the installation process of Gem Packages. It is an additional layer on top of the RubyGems and ensures the dependencies of both the system and the gem package before installing a Gem Package. It matches the compatible version of Gem with the Ubuntu System which helps in avoiding any dependency issues.
This article discusses the installation process of Ruby Bundler in Ubuntu.
How to Install the Ruby Bundle in Ubuntu?
The Ruby Bundler can easily be installed from the official repository of RubyGems using the Terminal. The following steps explain the installation process of Ruby Bundler in detail.
Step 1: Open Terminal
To open the Terminal, open the “Show Applications” menu by clicking on the “Applications Menu” icon on the Home Screen:
The Applications Menu will Open and you will see the Search Box at the Top of the Menu. In the search box, type “terminal”. The Terminal Application will appear:
Click on the Icon to open Terminal:
Instead of going to the Applications Menu and then searching for Terminal, you can fire up the Terminal using the “ctrl+alt+t” shortcut key as well:
Step 2: Update Existing Packages
Before installing Ruby in Ubuntu, ensure that the existing packages in your Ubuntu System are up to date. Update your existing packages using the Command:
Once the packages are updated, upgrade them using the “upgrade” command:
Wait for the packages to upgrade:
Step 3: Install Ruby
After updating your Ubuntu System Packages, install Ruby first by using the “apt-get” command:
Wait for the ruby packages to download and install:
Step 4: Set Up Bundler
To install the Ruby Bundler, the “gem” command is used as Bundler is a Gem to Bundle up Gems in Ubuntu. Install the Ruby Bundler using the Command:
Once the installation is completed, the terminal will inform about the Gem being installed:
Bonus Step: Remove Ruby
Ruby Bundler can be removed once you do not require any more need for it using the command:
While removing, it will ask for confirmation. Enter “Y” to continue with the removal process:
Conclusion
Ruby Bundler is installed from the terminal using the “gem” installation command by updating the existing packages first and then installing Ruby with the “apt install ruby ruby-dev” command. This article explained the installation method for Ruby Bundler in Ubuntu.