Ruby gem: zstd-ruby
gem install zstd-ruby -v 2.0.0.pre.preview1 gem 'zstd-ruby', '~> 2.0.0.pre.preview1' Gem::Specification.new do |spec| spec.name = "zstd-ruby" spec.version = "2.0.0.pre.preview1" spec.authors = ["SpringMT"] spec.license = "MIT" spec.summary = "Ruby binding for zstd(Zstandard - Fast real-time compression algorithm)" spec.description = "Ruby binding for zstd(Zstandard - Fast real-time compression algorithm). See https://github.com/facebook/zstd" spec.homepage = "https://github.com/SpringMT/zstd-ruby" spec.required_rubygems_version = "> 1.3.1" spec.add_development_dependency "bundler", ">= 0" spec.add_development_dependency "pry", ">= 0" spec.add_development_dependency "rake", "~> 13.0" spec.add_development_dependency "rake-compiler", "~> 1" spec.add_development_dependency "rspec", "~> 3.0" end
To lock this gem at this specific version, update your Gemfile:
gem 'zstd-ruby', '2.0.0.pre.preview1' Then run:
bundle install Note: This is an older version. Consider upgrading to the latest version (2.0.3) for the newest features and security fixes.
Run this to see all installed versions of zstd-ruby:
gem list zstd-ruby --exact To check for this exact version and get a true/false exit code (useful in scripts):
gem list zstd-ruby -i -v 2.0.0.pre.preview1 Exits 0 if installed, 1 if not.
To remove this specific version:
gem uninstall zstd-ruby -v 2.0.0.pre.preview1 To remove all installed versions at once:
gem uninstall zstd-ruby --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 zstd-ruby -v 2.0.0.pre.preview1 If it is not installed, fetch it first and then unpack the file:
gem fetch zstd-ruby -v 2.0.0.pre.preview1
gem unpack zstd-ruby-2.0.0.pre.preview1.gem
This creates a zstd-ruby-2.0.0.pre.preview1/ directory with the full source tree.
Use gem fetch to download the .gem file to the current directory:
gem fetch zstd-ruby -v 2.0.0.pre.preview1 Useful for auditing, offline installs, or mirroring to a private gem server.
If the gem is installed:
gem specification zstd-ruby -v 2.0.0.pre.preview1 From a downloaded .gem file:
gem fetch zstd-ruby -v 2.0.0.pre.preview1
gem specification zstd-ruby-2.0.0.pre.preview1.gem Version 2.0.0.pre.preview1 does not declare a minimum Ruby version requirement. It should work with any reasonably modern Ruby.
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 zstd-ruby -v 2.0.0.pre.preview1
If the gem provides an executable, use the _version_ wrapper syntax:
zstd-ruby _2.0.0.pre.preview1_ [args] In a Bundler project, pin the version in your Gemfile and run via bundle exec:
# Gemfile
gem 'zstd-ruby', '2.0.0.pre.preview1' bundle exec ruby your_script.rb