excid3 / jumpstart

Easily jumpstart a new Rails application with a bunch of great features by default
http://jumpstartrails.com
MIT License
1.2k stars 316 forks source link

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

Closed andyw8 closed 2 years ago

andyw8 commented 2 years ago

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.

excid3 commented 2 years ago

What was your create command?

andyw8 commented 2 years ago

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 https://github.com/excid3/jumpstart/pull/153 ?

excid3 commented 2 years ago

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

andyw8 commented 2 years ago

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

excid3 commented 2 years ago

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?

andyw8 commented 2 years ago

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

excid3 commented 2 years ago

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