Author: Sahil Suri

Using rubygems for managing ruby packages in Linux

Introduction Ruby has become a popular and powerful programming language over the years since its inception in 1995. The Ruby programming language is the foundation for the popular web development framework Ruby on Rails. Increased popularity implied increased user base and increased functionality. So, ruby packages or gems were introduced to add additional features to the installed ruby programming language. In this article, we will explain how to install and use RubyGems – a sophisticated package manager for Ruby.   Install RubyGems Ruby does not come installed on Linux systems out of the box. When you install RubyGems, it will install ruby as well as a required pre-requisite. Install rubygems on ubuntu: The ruby language packages, as well as the rubygems package, are available in the online repositories so you may type apt install rubgems to install them as shown below: root@linuxnix:~# apt install rubygems Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'ruby' instead of 'rubygems' The following additional packages will be installed: libruby2.3 rake ruby2.3 Suggested packages: ri ruby-dev The following NEW packages will be installed: libruby2.3 rake ruby ruby2.3 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. Need to get 3,053 kB of archives. After this operation, 14.0 MB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64...

Read More

dnf package manager examples

Introduction DNF is considered to become the replacement for yum as the next default package manager for yum. The dnf package manager was introduced with Fedora 18 and had been designated as the default package manager as of Fedora 22. DNF has the following advantages over its predecessor yum: Provides faster dependency resolution for packages with lesser memory usage as compared to yum. Its usage syntax is similar to that of yum so there’s no steep learning curve. Provides specific and detailed documentation regarding Python API. Execute parallel package management operaions. Runs in both Python 2 and Python 3 environments. We would like to point out that dnf lacks some of the options included in yum. Although it does comprise of all the features that would be required by a normal user to install and remove packages.In this article, we will explain how to install and use dnf package management software on your system.   DNF installation The dnf package along with its dependencies used to be available in the EPEL repository as of this writing. However, the package has been removed from the EPEL repository due to some security flaws. A replacement has not been added to the EPEl repository yet. Therefore, we will use wget to manually download the dnf package manager .rpm file along with its dependencies and install them on our Centos 7.3 system. [root@linuxnix...

Read More

Merging git branches on the command line and GitHub

Introduction In our previous articles on git branches we explained what are branches in git terminology. Branches provide a means to have a working copy of our code available in the master branch while we continue to make changes to it in a different branch. We also practically demonstrated how to create branches and work with them. In this article we will demonstrate how we could merge the work or updates that we’ve made while working in a branch with the master branch. The demonstration will consist of merging changes with the master branch on the command line as well as on a remote. For the purpose of this demonstration we will be using GitHub as our remote since we’ve already set it up and synced our repositories up there. Merging a git branch with the master branch on the command line: To merge a branch we first need to move in to the branch that we want to incorporate changes into. [sahil@linuxnix perl_scripts_for_training]$ git status # On branch my_branch nothing to commit, working directory clean [sahil@linuxnix perl_scripts_for_training]$ The output of the git status command above tells us that we are in the branch my_branch at the moment. We want to merge the changes made while working in this branch with the master branch. So let’s move into the master branch using the git checkout command as shown below:...

Read More

Over 16,000 readers, Get fresh content from “The Linux juggernaut”

Email Subscribe

ABOUT ME..!

My photo
My name is Surendra Kumar Anne. I hail from Vijayawada which is cultural capital of south Indian state of Andhra Pradesh. I am a Linux evangelist who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. At present I work at Bank of America as Sr. Analyst Systems and Administration. You can contact me at surendra (@) linuxnix dot com.