[RUBY] [Environment construction] Uninstall rails from local


I accidentally installed rails locally, so I'll write an article about the procedure when uninstalling.


macOS Catalina version 10.15.7 Homebrew 2.7.1 rbenv 1.1.2 ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin19] gem 3.2.4 Bundler version 2.1.4


First, use cd to change to your home directory. Next, check the installation status of gem with gem list.

gem list

*** LOCAL GEMS ***

rails (6.1.0,, 6.0.0)
rails-dom-testing (2.0.3)
rails-html-sanitizer (1.3.0)
rails-i18n (6.0.0)
railties (6.1.0,, 6.0.0)
rake (13.0.3, 13.0.1, 12.3.2)

rails (6.1.0,, 6.0.0) Since only rails6.0.0 is used, uninstall the other two.


I wondered if only gem uninstall rails was enough, but when I looked it up, it seems that railties also needs to be deleted.

gem uninstall rails -v ''
gem uninstall railties -v ''

When you type the above command, the following will be displayed.

You have requested to uninstall the gem:

rails- depends on railties (=
If you remove this gem, these dependencies will not be met.
Continue with Uninstall? [yN]  y
Successfully uninstalled railties-

You will be asked "Can I uninstall rails?", So enter y. [yN] means [yes or No].

Then uninstall 6.1.0.

gem uninstall rails -v '6.1.0'
gem uninstall railties -v '6.1.0'  

You have requested to uninstall the gem:

rails-6.1.0 depends on railties (= 6.1.0)
If you remove this gem, these dependencies will not be met.
Continue with Uninstall? [yN]  y

Check if it can be uninstalled.

rails -v                           
Rails 6.0.0

It was done! !!

Finally, load it with bundle inatall to reflect the changes.

bundle inatall

That's it.


I am posting an article in the hope that it will help people who are similarly troubled. See you next time ~



Recommended Posts

[Environment construction] Uninstall rails from local
Rails Docker environment construction
How to link Rails6 Vue (from environment construction)
Rails6 development environment construction [Mac]
Rails engineer environment construction ruby2.7.1
EC-CUBE4 environment construction (local edition)
Rails environment construction Rails5.2.1 ruby2.5.1 Catalina
[Rails / MySQL] Mac environment construction
Rails + MySQL environment construction with Docker
From 0 to Ruby on Rails environment construction [macOS] (From Homebrew installation to Rails installation)
Ruby on Rails 6.0 environment construction memo
Rails on Docker environment construction procedure
Troublesome Rails environment construction flow [Windows 10]
[Rails] AWS EC2 instance environment construction
Ruby on Rails --From environment construction to simple application development on WSL2
Rails environment construction with Docker (personal apocalypse)
Rails API server environment construction using docker-compose
[Docker] Development environment construction Rails6 / Ruby2.7 / MySQL8
Jekyll super introduction starting from 0 # 1 --Environment construction
Rails & React & Webpacker & MySQL Environment Construction Manual
Scala starting from scratch (environment construction mac)
Muscle Ruby on Rails Day 1 ~ Environment Construction ~
CentOS8.2 (x86_64) + ruby2.5 + Rails5.2 + MariaDB (10.3.17) environment construction
[Java] Environment construction
Java environment construction
Environment construction of Ruby on Rails from 0 [Cloud9] (From Ruby version change to Rails installation)
[Spring] Environment construction
Docker environment construction
[Rails] Run LINEBot in local environment using ngrok
Rails6 [API mode] + MySQL5.7 environment construction with Docker
Rails5.1 + puma SSL connection in local production environment
[Personal memo] Ruby on Rails environment construction (Windows)
Ruby on Rails development environment construction on M1 Mac
Wordpress local environment construction & development procedure with Docker
Penronse environment construction [Windows]
[Environment construction] Eclipse installation
[Flutter] Ubuntu 20.04 environment construction
virtulbox + vagrant + Docker + nginx + puma + MySQL Rails environment construction
Stable development environment construction manual for "Rails6" with "Docker-compose"
Environment construction of Rails5 + MySQL8.0 + top-level volumes with docker-compose
Deploy to Ruby on Rails Elastic beanstalk (Environment construction)
How to uninstall Rails
Circle CI environment construction
[Environment construction Mac] Ruby on Rails (+ Webpacker handles errors)
java development environment construction
SSL in the local environment of Docker / Rails / puma
[Ruby on Rails] From MySQL construction to database change
Cloud9 (Rails) from Github
[Procedure 1 for beginners] Ruby on Rails: Construction of development environment
[Environment construction] Get the Ruby on Rails 6 development environment within 1 hour
Rails application development environment construction with Docker [Docker, Rails, Puma, Nginx, MySQL]
Connect to AWS RDS from your local PC Docker environment
[Spring Boot] Environment construction (macOS)
I tried node-jt400 (Environment construction)
Rails6 (MySQL, Ubuntu environment, Cloud9)
MySQL 5.7 (Docker) environment construction memo
Introduction to Metabase ~ Environment Construction ~
JavaFX environment construction in Java 13
Redmine (Docker) environment construction memo
AtCoder Challenge Environment Construction (Java 8)
Offline environment construction Ruby edition