---
title: "Using PKI Express on Ruby"
description: "Using PKI Express on Ruby with the pki_express gem, installed through a Gemfile or the gem command, and a link to the Rails samples project."
canonical: "https://docs.lacunasoftware.com/en-us/articles/pki-express/ruby"
locale: "en"
product: "PKI Express"
last_updated: "2026-10-12"
---

# Using PKI Express on Ruby

PKI Express can be used on Ruby. To get started, see the [Ruby on Rails samples project](https://docs.lacunasoftware.com/en-us/articles/pki-express/ruby/rails).

## Client library

To use PKI Express on Ruby applications, use our **Ruby Gem** [pki_express](https://rubygems.org/gems/pki_express)
by declaring on your `Gemfile`:

```gemspec
gem 'pki_express', '~> 1.3.2'
```

After that, do a `bundle install` to download the gem and its dependencies (if you don't have Bundler installed,
get it [here](http://bundler.io/))

Alternatively, you can install the gem directly on command-line:

```sh
gem install pki_express
```

> **Note**
>
> Versions 1.3.2 and earlier of the gem call `File.exists?`, which Ruby 3.2 removed. On Ruby 3.2 or later, restore that
> method before the first call to PKI Express, for instance in an initializer, as the
> [Rails samples project](https://github.com/LacunaSoftware/PkiSuiteSamples/blob/master/ruby/rails/config/initializers/pki_express_ruby32_compat.rb) does:
>
> ```ruby
> File.singleton_class.send(:alias_method, :exists?, :exist?) unless File.respond_to?(:exists?)
> ```

The gem is open-source, hosted on [GitHub](https://github.com/LacunaSoftware/PkiExpressRuby). Feel free to
fork it if you need to make any customizations.
