简体   繁体   中英

How to completely revert gem version?

I'm trying to revert the 'bootstrap' gem from 'alpha6' to 'alpha3'.

I've run:

 $ gem uninstall bootstrap

        Select gem to uninstall:
         1. bootstrap-4.0.0.alpha3
         2. bootstrap-4.0.0.alpha6
         3. All versions
        > 2

Successfully uninstalled bootstrap-4.0.0.alpha6`

but when I try to start the server I get:

$ rails server
  Could not find bootstrap-4.0.0.alpha6 in any of the sources
  Run `bundle install` to install missing gems.

here's what's in my gemfile:

gem 'bootstrap', '~> 4.0.0.alpha3'

rails is still looking for alpha6. how do I tell rails to forget about alpha 6 and move on with it's life?

Here's how I fixed it:

run:

$ gem uninstall bootstrap
Successfully uninstalled bootstrap-4.0.0.alpha6

add the gem like this in your Gemfile, getting rid of the ~>

gem 'bootstrap', '4.0.0.alpha3'

run

$ bundle install

hopefully you see the nice message:

Installing bootstrap 4.0.0.alpha3 (was 4.0.0.alpha6)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM