Ruby gem: rails
gem install rails -v 7.0.0.alpha1 gem 'rails', '~> 7.0.0.alpha1' Gem::Specification.new do |spec|
spec.name = "rails"
spec.version = "7.0.0.alpha1"
spec.authors = ["David Heinemeier Hansson"]
spec.license = "MIT"
spec.summary = "Full-stack web application framework."
spec.description = "Ruby on Rails is a full-stack web framework optimized for programmer happiness and sustainable productivity. It encourages beautiful code by favoring convention over configuration."
spec.homepage = "https://rubyonrails.org"
spec.required_ruby_version = ">= 2.7.0"
spec.required_rubygems_version = ">= 1.8.11"
spec.metadata = {
"changelog_uri" => "https://github.com/rails/rails/releases/tag/v7.0.0.alpha1",
"bug_tracker_uri" => "https://github.com/rails/rails/issues",
"source_code_uri" => "https://github.com/rails/rails/tree/v7.0.0.alpha1",
"mailing_list_uri" => "https://discuss.rubyonrails.org/c/rubyonrails-talk",
"documentation_uri" => "https://api.rubyonrails.org/v7.0.0.alpha1/",
}
spec.add_dependency "actioncable", "= 7.0.0.alpha1"
spec.add_dependency "actionmailbox", "= 7.0.0.alpha1"
spec.add_dependency "actionmailer", "= 7.0.0.alpha1"
spec.add_dependency "actionpack", "= 7.0.0.alpha1"
spec.add_dependency "actiontext", "= 7.0.0.alpha1"
spec.add_dependency "actionview", "= 7.0.0.alpha1"
spec.add_dependency "activejob", "= 7.0.0.alpha1"
spec.add_dependency "activemodel", "= 7.0.0.alpha1"
spec.add_dependency "activerecord", "= 7.0.0.alpha1"
spec.add_dependency "activestorage", "= 7.0.0.alpha1"
spec.add_dependency "activesupport", "= 7.0.0.alpha1"
spec.add_dependency "bundler", ">= 1.15.0"
spec.add_dependency "railties", "= 7.0.0.alpha1"
spec.add_dependency "sprockets-rails", ">= 2.0.0"
end To lock this gem at this specific version, update your Gemfile:
gem 'rails', '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 rails:
gem list rails --exact To check for this exact version and get a true/false exit code (useful in scripts):
gem list rails -i -v 7.0.0.alpha1 Exits 0 if installed, 1 if not.
To remove this specific version:
gem uninstall rails -v 7.0.0.alpha1 To remove all installed versions at once:
gem uninstall rails --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 rails -v 7.0.0.alpha1 If it is not installed, fetch it first and then unpack the file:
gem fetch rails -v 7.0.0.alpha1
gem unpack rails-7.0.0.alpha1.gem
This creates a rails-7.0.0.alpha1/ directory with the full source tree.
Use gem fetch to download the .gem file to the current directory:
gem fetch rails -v 7.0.0.alpha1 Useful for auditing, offline installs, or mirroring to a private gem server.
If the gem is installed:
gem specification rails -v 7.0.0.alpha1 From a downloaded .gem file:
gem fetch rails -v 7.0.0.alpha1
gem specification rails-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 rails -v 7.0.0.alpha1
If the gem provides an executable, use the _version_ wrapper syntax:
rails _7.0.0.alpha1_ [args] In a Bundler project, pin the version in your Gemfile and run via bundle exec:
# Gemfile
gem 'rails', '7.0.0.alpha1' bundle exec ruby your_script.rb