Ruby gem: activerecord
gem install activerecord -v 5.0.0.racecar1 gem 'activerecord', '~> 5.0.0.racecar1' Gem::Specification.new do |spec| spec.name = "activerecord" spec.version = "5.0.0.racecar1" spec.authors = ["David Heinemeier Hansson"] spec.license = "MIT" spec.summary = "Object-relational mapper framework (part of Rails)." spec.description = "Databases on Rails. Build a persistent domain model by mapping database tables to Ruby classes. Strong conventions for associations, validations, aggregations, migrations, and testing come baked-in." spec.homepage = "https://rubyonrails.org" spec.required_ruby_version = ">= 2.2.2" spec.required_rubygems_version = "> 1.3.1" spec.add_dependency "activemodel", "= 5.0.0.racecar1" spec.add_dependency "activesupport", "= 5.0.0.racecar1" spec.add_dependency "arel", "~> 7.0" end
To lock this gem at this specific version, update your Gemfile:
gem 'activerecord', '5.0.0.racecar1' Then run:
bundle install Note: This is an older version. Consider upgrading to the latest version (8.1.1) for the newest features and security fixes.
Run this to see all installed versions of activerecord:
gem list activerecord --exact To check for this exact version and get a true/false exit code (useful in scripts):
gem list activerecord -i -v 5.0.0.racecar1 Exits 0 if installed, 1 if not.
To remove this specific version:
gem uninstall activerecord -v 5.0.0.racecar1 To remove all installed versions at once:
gem uninstall activerecord --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 activerecord -v 5.0.0.racecar1 If it is not installed, fetch it first and then unpack the file:
gem fetch activerecord -v 5.0.0.racecar1
gem unpack activerecord-5.0.0.racecar1.gem
This creates a activerecord-5.0.0.racecar1/ directory with the full source tree.
Use gem fetch to download the .gem file to the current directory:
gem fetch activerecord -v 5.0.0.racecar1 Useful for auditing, offline installs, or mirroring to a private gem server.
If the gem is installed:
gem specification activerecord -v 5.0.0.racecar1 From a downloaded .gem file:
gem fetch activerecord -v 5.0.0.racecar1
gem specification activerecord-5.0.0.racecar1.gem Version 5.0.0.racecar1 requires Ruby >= 2.2.2.
Check your Ruby version with ruby -v.
Runtime dependencies — installed automatically with the gem:
To see the full resolved dependency tree after installation: gem dependency activerecord -v 5.0.0.racecar1
If the gem provides an executable, use the _version_ wrapper syntax:
activerecord _5.0.0.racecar1_ [args] In a Bundler project, pin the version in your Gemfile and run via bundle exec:
# Gemfile
gem 'activerecord', '5.0.0.racecar1' bundle exec ruby your_script.rb