Ruby gem: rails
gem install rails -v 5.0.0.racecar1 gem 'rails', '~> 5.0.0.racecar1' Gem::Specification.new do |spec| spec.name = "rails" spec.version = "5.0.0.racecar1" 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.2.2" spec.required_rubygems_version = ">= 1.8.11" spec.add_dependency "actioncable", "= 5.0.0.racecar1" spec.add_dependency "actionmailer", "= 5.0.0.racecar1" spec.add_dependency "actionpack", "= 5.0.0.racecar1" spec.add_dependency "actionview", "= 5.0.0.racecar1" spec.add_dependency "activejob", "= 5.0.0.racecar1" spec.add_dependency "activemodel", "= 5.0.0.racecar1" spec.add_dependency "activerecord", "= 5.0.0.racecar1" spec.add_dependency "activesupport", "= 5.0.0.racecar1" spec.add_dependency "bundler", "< 2.0, >= 1.3.0" spec.add_dependency "railties", "= 5.0.0.racecar1" spec.add_dependency "sprockets-rails", ">= 2.0.0" end
To lock this gem at this specific version, update your Gemfile:
gem 'rails', '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 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 5.0.0.racecar1 Exits 0 if installed, 1 if not.
To remove this specific version:
gem uninstall rails -v 5.0.0.racecar1 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 5.0.0.racecar1 If it is not installed, fetch it first and then unpack the file:
gem fetch rails -v 5.0.0.racecar1
gem unpack rails-5.0.0.racecar1.gem
This creates a rails-5.0.0.racecar1/ directory with the full source tree.
Use gem fetch to download the .gem file to the current directory:
gem fetch rails -v 5.0.0.racecar1 Useful for auditing, offline installs, or mirroring to a private gem server.
If the gem is installed:
gem specification rails -v 5.0.0.racecar1 From a downloaded .gem file:
gem fetch rails -v 5.0.0.racecar1
gem specification rails-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 rails -v 5.0.0.racecar1
If the gem provides an executable, use the _version_ wrapper syntax:
rails _5.0.0.racecar1_ [args] In a Bundler project, pin the version in your Gemfile and run via bundle exec:
# Gemfile
gem 'rails', '5.0.0.racecar1' bundle exec ruby your_script.rb