rails / cssbundling-rails

Bundle and process CSS in Rails with Tailwind, PostCSS, and Sass via Node.js.
MIT License
563 stars 83 forks source link

bin/dev file collision, could it be prevented ? #146

Closed bdavidxyz closed 5 months ago

bdavidxyz commented 5 months ago

Use case : create a new rails application

rails -v
7.1.2
rails new theapp --force --database=postgresql -j=esbuild -c=tailwind --skip-docker

Will result, despite the "force" option, into an interrupt :

       rails  css:install:tailwind
       apply  /home/david/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/cssbundling-rails-1.3.3/lib/install/install.rb
(...)
      append    Procfile.dev
  Add bin/dev to start foreman
    conflict    bin/dev
  Overwrite /home/david/workspace/railsback/flow/theapp/bin/dev? (enter "h" for help) [Ynaqdhm] a

Not a big deal for a simple "rails new" command, but still annoying in many scenario when you have to generate rails skeleton (template) apps, interrupting the build flow.

bdavidxyz commented 5 months ago

One possible hack is

echo "Y" | rails new theapp --force --database=postgresql -j=esbuild -c=tailwind --skip-docker

See https://stackoverflow.com/a/14397049/2595513

dhh commented 5 months ago

Fixed in Supported in 1.4.0.