Open In App

How to Install SQLite3 for Ruby on Linux?

Last Updated : 13 Nov, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

SQLite is a zero-configured database in which the configuration is not required in the system. The SQLite library has a SQL database engine that is self-contained, serverless, and transactional. It is written in ANSI-C and the API that it provides is very easy to use. It was originally made in august 2000 and was named SQLite because it is very light-weight (~<500kb). Although it is very small in comparison to its counterparts, it still has pretty much the same features available. As per the needs of our application, SQLite can be linked statically or dynamically, and it can directly access the storage files.

Features of SQLite

  1. It is serverless i.e does not require any server process to operate.
  2. It is multiplatform compatible (Linux, windows, and mac).
  3. Open-source and completely free.
  4. Configuration is not necessary.
  5. It is a self-contained system and does not rely upon external dependencies.
  6. Provides us with variable lengths of columns and a large number of APIs.
  7. All the transactions in SQLite are ACID-compliant and allow safe access from different processes.
  8.  Data storage is very convenient and flexible.

Now let’s see how to install SQLite3 for ruby on Linux, the operating system will be ubuntu.

Installation of SQLite3 for Ruby on Linux

Step 1: Make sure your system is updated and upgraded.

sudo apt update && sudo apt upgrade

Updating-and-upgrading-system

 

Step 2: Install SQLite 3. Type the below command to install SQLite 3 on your system.

sudo apt-get install sqlite3 libsqlite3-dev

Installing-SQLite-3

 

Step 3: Confirm the version. To confirm that SQLite3 has been successfully installed, check its version by using the “-version” flag.

sqlite3  -version

Confirming-version

 

Step 4: Bind SQLite with ruby. Before doing this make sure to have a ruby on your system.

sudo apt install ruby

Installing-ruby

 

Now bind ruby with SQLite3 with the following command.

sudo gem install sqlite3-ruby

Binding-ruby-with-SQLite

 

So these were the steps required to install SQLite3 for ruby on Linux. 


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads