sj26 / mailcatcher

Catches mail and serves it through a dream.
http://mailcatcher.me
MIT License
6.28k stars 574 forks source link

Current `rack` dependency version causes conflict with modern `rackup` versions #562

Open 64kramsystem opened 1 month ago

64kramsystem commented 1 month ago

The rack dependency version, ~>2.2, causes conflicts with modern rackup versions (e.g. 2.1.0); it should be verified and upgraded to a modern version (e.g. ~>3.1).

sj26 commented 1 month ago

How does it cause conflicts?

64kramsystem commented 1 month ago

Try installing rack version ~>2.2, then the latest rackup version; you'll get a conflict on the rackup binary.

sj26 commented 1 month ago

Ah yes, I can reproduce:

$ gem install mailcatcher
...
Successfully installed rack-2.2.9
...

$ gem install rackup
Fetching rack-3.1.7.gem
Fetching rackup-2.1.0.gem
Successfully installed rack-3.1.7
rackup's executable "rackup" conflicts with rack
Overwrite the executable? [yN]
ERROR:  Error installing rackup:
    "rackup" from rackup conflicts with installed executable from rack

Sounds like a bump is in order. It might be possible now, given the dependencies on thin and websocket-driver have been unwound a little.

aried3r commented 1 month ago

Do you think this would potentially solve https://github.com/sj26/mailcatcher/issues/560?

sj26 commented 1 month ago

No. #560 is an error in how homebrew has packaged mailcatcher.

Workaround for that is don’t install mailcatcher with homebrew. Just:

gem install mailcatcher
dsandstrom commented 1 month ago

No. #560 is an error in how homebrew has packaged mailcatcher.

Workaround for that is don’t install mailcatcher with homebrew. Just:

gem install mailcatcher

Results in

rack's executable "rackup" conflicts with rackup
Overwrite the executable? [yN]
ERROR:  Error installing mailcatcher:
    "rackup" from rack conflicts with installed executable from rackup

I don't want to overwrite the executable so can't install

sj26 commented 1 month ago

Just press “n” for now

dsandstrom commented 1 month ago

Just press “n” for now

Right, that results in not installing the gem

64kramsystem commented 1 month ago

No. #560 is an error in how homebrew has packaged mailcatcher. Workaround for that is don’t install mailcatcher with homebrew. Just:

gem install mailcatcher

Results in

rack's executable "rackup" conflicts with rackup
Overwrite the executable? [yN]
ERROR:  Error installing mailcatcher:
  "rackup" from rack conflicts with installed executable from rackup

I don't want to overwrite the executable so can't install

If you can, uninstall all the versions of rackup, and install version 1.0; it won't conflict.

sj26 commented 1 month ago

Just press “n” for now

Right, that results in not installing the gem

No, it should install the gem, it just won’t link that particular executable (which isn’t required, at least for mailcatcher)

dsandstrom commented 1 month ago

If you can, uninstall all the versions of rackup, and install version 1.0; it won't conflict.

Trying to get mailcatcher to work with rack 3, rackup 2.1

dsandstrom commented 1 month ago

Just press “n” for now

Right, that results in not installing the gem

No, it should install the gem, it just won’t link that particular executable (which isn’t required, at least for mailcatcher)

I must be missing something

dsandstrom commented 2 weeks ago

I started to look into what it would take to update this gem so it works with rack 3. Unfortunately, I couldn't even get gems to install.

The limiting factor starts with sprockets-sass. Sprockets v4 supports rack 3, but sprockets-sass hasn't been updated to support that version.

https://github.com/petebrowne/sprockets-sass/blob/master/sprockets-sass.gemspec#L39