Ruby gem: bigdecimal
gem install bigdecimal -v 1.4.2.pre.20181216a gem 'bigdecimal', '~> 1.4.2.pre.20181216a' Gem::Specification.new do |spec| spec.name = "bigdecimal" spec.version = "1.4.2.pre.20181216a" spec.authors = ["Kenta Murata","Zachary Scott","Shigeo Kobayashi"] spec.license = "ruby" spec.summary = "Arbitrary-precision decimal floating-point number library." spec.description = "This library provides arbitrary-precision decimal floating-point number class." spec.homepage = "https://github.com/ruby/bigdecimal" spec.required_ruby_version = ">= 2.3.0" spec.required_rubygems_version = "> 1.3.1" spec.add_development_dependency "minitest", "< 5.0.0" spec.add_development_dependency "pry", ">= 0" spec.add_development_dependency "rake", "~> 10.0" spec.add_development_dependency "rake-compiler", ">= 0.9" spec.add_development_dependency "rake-compiler-dock", ">= 0.6.1" end
To lock this gem at this specific version, update your Gemfile:
gem 'bigdecimal', '1.4.2.pre.20181216a' Then run:
bundle install Note: This is an older version. Consider upgrading to the latest version (3.3.1) for the newest features and security fixes.
Run this to see all installed versions of bigdecimal:
gem list bigdecimal --exact To check for this exact version and get a true/false exit code (useful in scripts):
gem list bigdecimal -i -v 1.4.2.pre.20181216a Exits 0 if installed, 1 if not.
To remove this specific version:
gem uninstall bigdecimal -v 1.4.2.pre.20181216a To remove all installed versions at once:
gem uninstall bigdecimal --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.
If the gem is already installed, unpack its source into the current directory:
gem unpack bigdecimal -v 1.4.2.pre.20181216a If it is not installed, fetch it first and then unpack the file:
gem fetch bigdecimal -v 1.4.2.pre.20181216a
gem unpack bigdecimal-1.4.2.pre.20181216a.gem
This creates a bigdecimal-1.4.2.pre.20181216a/ directory with the full source tree.
Use gem fetch to download the .gem file to the current directory:
gem fetch bigdecimal -v 1.4.2.pre.20181216a Useful for auditing, offline installs, or mirroring to a private gem server.
If the gem is installed:
gem specification bigdecimal -v 1.4.2.pre.20181216a From a downloaded .gem file:
gem fetch bigdecimal -v 1.4.2.pre.20181216a
gem specification bigdecimal-1.4.2.pre.20181216a.gem Version 1.4.2.pre.20181216a requires Ruby >= 2.3.0.
Check your Ruby version with ruby -v.
Development dependencies — only needed when working on the gem itself:
To see the full resolved dependency tree after installation: gem dependency bigdecimal -v 1.4.2.pre.20181216a
If the gem provides an executable, use the _version_ wrapper syntax:
bigdecimal _1.4.2.pre.20181216a_ [args] In a Bundler project, pin the version in your Gemfile and run via bundle exec:
# Gemfile
gem 'bigdecimal', '1.4.2.pre.20181216a' bundle exec ruby your_script.rb