简体   繁体   中英

How to change version of gem?

I am trying to update a gem (specifically bootstrap-sass) to the latest version (3.1.1). To do this I first edited the Gemfile to change the bootstrap line to this:

gem 'bootstrap-sass', '3.1.1'

Then I ran

bundle install
bundle update
bundle install

and started the server, but when looking at the custom CSS file with Bootstrap included, the CSS included was still version 2.3.2. There is probably a simple answer to this question to force the update upon all components of the app, but how do I apply this update?

Here's the Github repo so people can help debug faster: https://github.com/afuhrtrumpet/menu_app

Per the bootstrap-sass readme.md at: https://github.com/twbs/bootstrap-sass

Make sure you have sass-rails in your Gemfile too.

gem 'sass-rails', '>= 3.2'

Since you already had been running bootstrap, I presume you have @import 'bootstrap' in your CSS tree.

The old version of bootstrap-sass was still installed along with the new version and was still being used. The following command fixed it:

gem cleanup bootstrap-sass

删除Gemfile.lock,然后重新运行bundle命令

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