pg 0.19.0.pre20160820113039

Ruby gem: pg

Install This Version

Using gem command

gem install pg -v 0.19.0.pre20160820113039

In your Gemfile

gem 'pg', '~> 0.19.0.pre20160820113039'

Gemspec

Gem::Specification.new do |spec|
  spec.name    = "pg"
  spec.version = "0.19.0.pre20160820113039"
  spec.authors = ["Michael Granger","Lars Kanis"]
  spec.license = "BSD-3-Clause"
  spec.summary = "Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/]"
  spec.description = "Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/].\n\nIt works with {PostgreSQL 9.1 and later}[http://www.postgresql.org/support/versioning/].\n\nA small example usage:\n\n  #!/usr/bin/env ruby\n\n  require 'pg'\n\n  # Output a table of current connections to the DB\n  conn = PG.connect( dbname: 'sales' )\n  conn.exec( \"SELECT * FROM pg_stat_activity\" ) do |result|\n    puts \"     PID | User             | Query\"\n    result.each do |row|\n      puts \" %7d | %-16s | %s \" %\n        row.values_at('procpid', 'usename', 'current_query')\n    end\n  end"
  spec.homepage = "https://github.com/ged/ruby-pg"
  spec.required_ruby_version = ">= 2.0.0"
  spec.required_rubygems_version = "> 1.3.1"
  spec.platform = "x86-mingw32"

  spec.add_development_dependency "hoe", "~> 3.12"
  spec.add_development_dependency "hoe-bundler", "~> 1.0"
  spec.add_development_dependency "hoe-deveiate", "~> 0.8"
  spec.add_development_dependency "hoe-highline", "~> 0.2"
  spec.add_development_dependency "hoe-mercurial", "~> 1.4"
  spec.add_development_dependency "rake-compiler", "~> 0.9"
  spec.add_development_dependency "rake-compiler-dock", "~> 0.5"
  spec.add_development_dependency "rdoc", "~> 4.0"
  spec.add_development_dependency "rspec", "~> 3.0"
end

Frequently Asked Questions

How do I lock the pg gem at version 0.19.0.pre20160820113039?

To lock this gem at this specific version, update your Gemfile:

gem 'pg', '0.19.0.pre20160820113039'

Then run:

bundle install

Note: This is an older version. Consider upgrading to the latest version (1.6.2) for the newest features and security fixes.

How do I check if pg version 0.19.0.pre20160820113039 is installed?

Run this to see all installed versions of pg:

gem list pg --exact

To check for this exact version and get a true/false exit code (useful in scripts):

gem list pg -i -v 0.19.0.pre20160820113039

Exits 0 if installed, 1 if not.

How do I uninstall pg version 0.19.0.pre20160820113039?

To remove this specific version:

gem uninstall pg -v 0.19.0.pre20160820113039

To remove all installed versions at once:

gem uninstall pg --all

If another gem depends on this version, RubyGems will warn you. Add --force to bypass the warning, but check nothing still needs it first.

How do I unpack pg version 0.19.0.pre20160820113039?

If the gem is already installed, unpack its source into the current directory:

gem unpack pg -v 0.19.0.pre20160820113039

If it is not installed, fetch it first and then unpack the file:

gem fetch pg -v 0.19.0.pre20160820113039 gem unpack pg-0.19.0.pre20160820113039.gem

This creates a pg-0.19.0.pre20160820113039/ directory with the full source tree.

How do I download pg version 0.19.0.pre20160820113039 without installing it?

Use gem fetch to download the .gem file to the current directory:

gem fetch pg -v 0.19.0.pre20160820113039

Useful for auditing, offline installs, or mirroring to a private gem server.

How do I inspect the gemspec for pg version 0.19.0.pre20160820113039?

If the gem is installed:

gem specification pg -v 0.19.0.pre20160820113039

From a downloaded .gem file:

gem fetch pg -v 0.19.0.pre20160820113039 gem specification pg-0.19.0.pre20160820113039.gem
What Ruby version does pg version 0.19.0.pre20160820113039 require?

Version 0.19.0.pre20160820113039 requires Ruby >= 2.0.0.

Check your Ruby version with ruby -v.

What dependencies does pg version 0.19.0.pre20160820113039 have?

Development dependencies — only needed when working on the gem itself:

  • hoe ~> 3.12
  • hoe-bundler ~> 1.0
  • hoe-deveiate ~> 0.8
  • hoe-highline ~> 0.2
  • hoe-mercurial ~> 1.4
  • rake-compiler ~> 0.9
  • rake-compiler-dock ~> 0.5
  • rdoc ~> 4.0
  • rspec ~> 3.0

To see the full resolved dependency tree after installation: gem dependency pg -v 0.19.0.pre20160820113039

How do I use pg version 0.19.0.pre20160820113039 when multiple versions are installed?

If the gem provides an executable, use the _version_ wrapper syntax:

pg _0.19.0.pre20160820113039_ [args]

In a Bundler project, pin the version in your Gemfile and run via bundle exec:

# Gemfile gem 'pg', '0.19.0.pre20160820113039'
bundle exec ruby your_script.rb

Docker Installation

Alpine Linux

FROM alpine:latest

# Install Ruby and build tools
RUN apk add --no-cache ruby ruby-dev build-base

# Install system dependencies
RUN apk add --no-cache \
    openssl-dev \
    postgresql-client \
    postgresql-dev

# Note: The following dependencies do not have package lists for alpine:
# - libruby (canonical: libruby)

# Install the gem
RUN gem install pg -v 0.19.0.pre20160820113039

# Verify installation
RUN ruby -e "require 'pg'; puts 'Successfully loaded pg'"

Arch Linux

FROM archlinux:latest

# Install Ruby and build tools
RUN pacman -Sy --noconfirm ruby base-devel

# Install system dependencies
RUN pacman -Sy --noconfirm \
    openssl \
    postgresql-libs

# Note: The following dependencies do not have package lists for arch:
# - libruby (canonical: libruby)

# Install the gem
RUN gem install pg -v 0.19.0.pre20160820113039

# Verify installation
RUN ruby -e "require 'pg'; puts 'Successfully loaded pg'"

Debian

FROM debian:bookworm-slim

# Install Ruby and build tools
RUN apt-get update -qq && apt-get install -y --no-install-recommends ruby ruby-dev build-essential

# Install system dependencies
RUN apt-get update -qq && \
    apt-get install -y --no-install-recommends     libssl-dev    postgresql-client    libpq-dev&& \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# Note: The following dependencies do not have package lists for debian:
# - libruby (canonical: libruby)

# Install the gem
RUN gem install pg -v 0.19.0.pre20160820113039

# Verify installation
RUN ruby -e "require 'pg'; puts 'Successfully loaded pg'"

Fedora

FROM fedora:latest

# Install Ruby and build tools
RUN dnf install -y ruby ruby-devel gcc gcc-c++ make

# Install system dependencies
RUN dnf install -y \
    openssl-devel \
    postgresql \
    libpq-devel && \
    dnf clean all

# Note: The following dependencies do not have package lists for fedora:
# - libruby (canonical: libruby)

# Install the gem
RUN gem install pg -v 0.19.0.pre20160820113039

# Verify installation
RUN ruby -e "require 'pg'; puts 'Successfully loaded pg'"

Ubuntu

FROM ubuntu:24.04

# Install Ruby and build tools
RUN apt-get update -qq && apt-get install -y --no-install-recommends ruby ruby-dev build-essential

# Install system dependencies
RUN apt-get update -qq && \
    apt-get install -y --no-install-recommends     libssl-dev    postgresql-client    libpq-dev&& \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# Note: The following dependencies do not have package lists for ubuntu:
# - libruby (canonical: libruby)

# Install the gem
RUN gem install pg -v 0.19.0.pre20160820113039

# Verify installation
RUN ruby -e "require 'pg'; puts 'Successfully loaded pg'"

Nixpacks

Deploy with Nixpacks (Railway, Render, etc.)

# nixpacks.toml for pg 0.19.0.pre20160820113039

[phases.setup]
# System dependencies:
aptPkgs = ["libssl-dev", "postgresql-client", "libpq-dev"]

# Note: The following dependencies do not have package lists for debian:
# - libruby (canonical: libruby)

[phases.install]
cmds = ["gem install pg -v 0.19.0.pre20160820113039"]

[phases.build]
cmds = ["ruby -e \"require 'pg'; puts 'Successfully loaded pg'\""]

Save this as nixpacks.toml in your project root.

Cloud Native Buildpacks

Deploy with Cloud Native Buildpacks (Heroku, Paketo, etc.)

# package.toml for pg 0.19.0.pre20160820113039
# Cloud Native Buildpacks configuration

# System dependencies:
[[build.env]]
name = "BP_APT_PACKAGES"
value = "libssl-dev postgresql-client libpq-dev"

# Note: The following dependencies do not have package lists for debian:
# - libruby (canonical: libruby)

# Gem installation will be handled by the Ruby buildpack
# which automatically installs gems from Gemfile or bundler

Save this as package.toml in your project root.

Nix Shell

Develop with Nix using ruby-nixpkgs

# shell.nix for pg 0.19.0.pre20160820113039
# Usage: nix-shell
# Uses ruby-nixpkgs for gem management

{ pkgs ? import <nixpkgs> {} }:

let
  rubyVersion = pkgs.ruby_3_3;

  # Ruby environment with ruby-nixpkgs
  rubyEnv = pkgs.bundlerEnv {
    name = "pg-0.19.0.pre20160820113039";
    ruby = rubyVersion;
    gemdir = ./.;
  };
in

pkgs.mkShell {
  buildInputs = [
    rubyVersion
    pkgs.bundler
    pkgs.ruby-nixpkgs

    # System dependencies
    pkgs.postgresql

    # Note: The following dependencies do not have package lists for nixpkgs:
    # - libruby (canonical: libruby)
    # - openssl (canonical: openssl)
  ];

  shellHook = ''
    echo "Ruby environment for pg 0.19.0.pre20160820113039"
    echo "Use: gem install pg -v 0.19.0.pre20160820113039"
  '';
}

Save this as shell.nix in your project root, then run nix-shell.

Devenv

Develop with Devenv for declarative development environments

# devenv.nix for pg 0.19.0.pre20160820113039
# Usage: devenv shell

{ pkgs, lib, config, ... }:

{
  languages.ruby = {
    enable = true;
    version = "3.3.0";
  };

  packages = [
    pkgs.postgresql

    # Note: The following dependencies do not have package lists for nixpkgs:
    # - libruby (canonical: libruby)
    # - openssl (canonical: openssl)
  ];

  enterShell = ''
    echo "Development environment for pg 0.19.0.pre20160820113039"
    echo "Use: gem install pg -v 0.19.0.pre20160820113039"
  '';
}

Save this as devenv.nix in your project root, then run devenv shell.

Nix Flakes

Develop with Nix Flakes for reproducible development environments

# flake.nix for pg 0.19.0.pre20160820113039
# Usage: nix develop

{
  description = "Development environment for pg 0.19.0.pre20160820113039";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs = { self, nixpkgs, flake-utils }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = nixpkgs.legacyPackages.${system};
        rubyVersion = pkgs.ruby_3_3;
      in
      {
        devShells.default = pkgs.mkShell {
          buildInputs = [
            rubyVersion
            pkgs.bundler

            # System dependencies
            pkgs.postgresql

            # Note: The following dependencies do not have package lists for nixpkgs:
            # - libruby (canonical: libruby)
            # - openssl (canonical: openssl)
          ];

          shellHook = ''
            echo "Development environment for pg 0.19.0.pre20160820113039"
            echo "Use: gem install pg -v 0.19.0.pre20160820113039"
          '';
        };
      }
    );
}

Save this as flake.nix in your project root, then run nix develop.

Download Statistics

This version
2,421
All versions combined
440,897,261

Other Versions