Ruby gem: activerecord
gem install activerecord -v 7.0.0.alpha1 gem 'activerecord', '~> 7.0.0.alpha1' Gem::Specification.new do |spec|
spec.name = "activerecord"
spec.version = "7.0.0.alpha1"
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.7.0"
spec.required_rubygems_version = "> 1.3.1"
spec.metadata = {
"changelog_uri" => "https://github.com/rails/rails/blob/v7.0.0.alpha1/activerecord/CHANGELOG.md",
"bug_tracker_uri" => "https://github.com/rails/rails/issues",
"source_code_uri" => "https://github.com/rails/rails/tree/v7.0.0.alpha1/activerecord",
"mailing_list_uri" => "https://discuss.rubyonrails.org/c/rubyonrails-talk",
"documentation_uri" => "https://api.rubyonrails.org/v7.0.0.alpha1/",
}
spec.add_dependency "activemodel", "= 7.0.0.alpha1"
spec.add_dependency "activesupport", "= 7.0.0.alpha1"
end To lock this gem at this specific version, update your Gemfile:
gem 'activerecord', '7.0.0.alpha1' 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 7.0.0.alpha1 Exits 0 if installed, 1 if not.
To remove this specific version:
gem uninstall activerecord -v 7.0.0.alpha1 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 7.0.0.alpha1 If it is not installed, fetch it first and then unpack the file:
gem fetch activerecord -v 7.0.0.alpha1
gem unpack activerecord-7.0.0.alpha1.gem
This creates a activerecord-7.0.0.alpha1/ directory with the full source tree.
Use gem fetch to download the .gem file to the current directory:
gem fetch activerecord -v 7.0.0.alpha1 Useful for auditing, offline installs, or mirroring to a private gem server.
If the gem is installed:
gem specification activerecord -v 7.0.0.alpha1 From a downloaded .gem file:
gem fetch activerecord -v 7.0.0.alpha1
gem specification activerecord-7.0.0.alpha1.gem Version 7.0.0.alpha1 requires Ruby >= 2.7.0.
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 7.0.0.alpha1
If the gem provides an executable, use the _version_ wrapper syntax:
activerecord _7.0.0.alpha1_ [args] In a Bundler project, pin the version in your Gemfile and run via bundle exec:
# Gemfile
gem 'activerecord', '7.0.0.alpha1' bundle exec ruby your_script.rb