excid3/jumpstart

Duplicate `Gemfile` entry for `cssbundling-rails` when creating a new app

andyw8 opened this issue · 7 comments

When creating a new app with Rails 7.0.1, the following warning is emitted:

Your Gemfile lists the gem cssbundling-rails (>= 0) more than once.
You should probably keep only one of them.
Remove any duplicate entries and specify the gem only once.
While it's not a problem now, it could cause errors if you change the version of one of them later.

I checked the Gemfile and cssbundling-rails is indeed listed twice.

What was your create command?

rails new myapp -d postgresql -m https://raw.githubusercontent.com/excid3/jumpstart/master/template.rb --skip-javascript (from the README).

Could it be because Rails now includes css-bundling by default, but it's also added by #153 ?

Hmm, Rails shouldn't be including css-bundling by default. It should just use the asset pipeline.

Sorry, my mistake, I had --css bootstrap within my ~/.railsrc from some previous work.

You won't be the only one that adds --css, so maybe we adjust and grep the Gemfile for cssbundling-rails before adding the gem?

Yeah, that seems sensible. I'll take a look at adding a check for that.

Sounds good, let me know if you have any questions. 👍