remove and reinstall rubygems (reinstall RVM)
Install rvm again:
Install rvm
To uninstall gem simply,
gem uninstall <gem-name>
To uninstall a particular version of gem:
gem uninstall <gem-name> --version <gem-version>
How to reinstall a gem using bundler
First I did a gem q --L
, the shortcut for gem query --local
. It outputs me the all the local gems installed.
actionmailer (3.2.8, 3.2.6, 3.2.1, 3.1.0)
actionpack (3.2.8, 3.2.6, 3.2.1, 3.1.0)
activemodel (3.2.8, 3.2.6, 3.2.1, 3.1.0)
activerecord (3.2.8, 3.2.6, 3.2.1, 3.1.0)
activeresource (3.2.8, 3.2.6, 3.2.1, 3.1.0)
activesupport (3.2.8, 3.2.6, 3.2.1, 3.1.0)
acts-as-taggable-on (2.3.3)
...
And then, following DVG advice, I uninstalled the gem using its correct name gem uninstall acts-as-taggable-on
and ran bundle install
. After that I was able to rails c
or rails s
again without any problem.
How do I force Bundler to reinstall all of my gems?
bundle install --redownload
See the reference for bundle install
: https://bundler.io/v2.2/man/bundle-install.1.html
or
bundle install --force
For older versions of bundler
Don't reinstall if gem is already installed
You can use the --conservative
flag with gem install.
gem install sqlite -v 1.3.8 --conservative
It won't install or update any gems that meet the version requirement.
Related Topics
Rails Error Message Displays Key and I Only Want Value
How to Run an Excel MACro from Ruby
Insert Rows on Specific Line in a File
What's Does the [5.0] in Rails 5's Activerecord::Migration Mean
Should Gemfile.Lock Be Committed to Source Control on Windows
Ruby, How to Access Local Variables Outside the Do - End Loop
Cucumber Step Definition for "Given That I'm Logged In"
Why Does Ruby Hash a Fixnum N to 2N+1
How to Capture a Part of a Screen Using Ruby on Windows
Nested Form_For Singular Resource
Building a Simple Search Form in Rails
Is Ruby Any Good for Gui Development
How to "Extract" Values from a Multidimensional Array in a Smart Way
Https Request Using Net::Http's Block Form -- Is It Possible
Ruby: Syntax for Defining a Constant Inside a Struct
Rvm Install Ruby-1.9.3-P286: Error Running 'Make -J 9' (Osx: Mountain Lion)