telegram-bot-rb / telegram-bot

Ruby gem for building Telegram Bot with optional Rails integration
MIT License
637 stars 118 forks source link

Incompatible with Rails 8.x.x #249

Closed gczh closed 1 day ago

gczh commented 1 month ago

I'm currently setting up new Rails 8 projects and porting my Telegram bots code over (for notifications, etc) and I'm encountering the following error when running bundle in CLI.

Is there anyway to have the gem support newer Rails versions?

Could not find compatible versions

    Because telegram-bot < 0.15.2 depends on Ruby ~> 2.0
      and telegram-bot >= 0.15.1, < 0.15.6 depends on activesupport >= 4.0, < 6.2,
      telegram-bot < 0.15.6 requires Ruby ~> 2.0 or activesupport >= 4.0, < 6.2.
    And because telegram-bot >= 0.15.6, < 0.16.0 depends on activesupport >= 4.0, < 7.1
      and telegram-bot >= 0.16.0, < 0.16.4 depends on activesupport >= 4.0, < 7.2,
      telegram-bot < 0.16.4 requires activesupport >= 4.0, < 7.2 or Ruby ~> 2.0.
    Because rails >= 8.0.0.rc1 depends on activesupport = 8.0.0.rc1
      and rails >= 8.0.0.beta1, < 8.0.0.rc1 depends on activesupport = 8.0.0.beta1,
      rails >= 8.0.0.beta1 requires activesupport = 8.0.0.beta1 OR = 8.0.0.rc1.
(1) Thus, if rails >= 8.0.0.beta1 and telegram-bot < 0.16.4 then Ruby ~> 2.0.

    Because rails >= 8.0.0.rc1 depends on activesupport = 8.0.0.rc1
      and rails >= 8.0.0.beta1, < 8.0.0.rc1 depends on actionpack = 8.0.0.beta1,
      rails >= 8.0.0.beta1 requires activesupport = 8.0.0.rc1 or actionpack = 8.0.0.beta1.
    And because telegram-bot >= 0.16.4 depends on actionpack >= 4.0, < 7.3
      and telegram-bot >= 0.16.4 depends on activesupport >= 4.0, < 7.3,
      rails >= 8.0.0.beta1 is incompatible with telegram-bot >= 0.16.4.
    And because if rails >= 8.0.0.beta1 and telegram-bot < 0.16.4 then Ruby ~> 2.0 (1),
      rails >= 8.0.0.beta1 requires Ruby ~> 2.0.
    So, because Gemfile depends on rails ~> 8.0.0.beta1
      and current Ruby version is = 3.2.2,
      version solving has failed.
printercu commented 1 month ago

Hey, I see rails 8 is not released yet. I'll add support when it's released. Meanwhile please fork and add any fixes if necessary. PRs are welcome.

thomaswitt commented 3 weeks ago

@printercu Rails 8 was released yesterday (https://rubyonrails.org/2024/11/7/rails-8-no-paas-required). Unfortunately this is stopping us from migrating to Rails 8…

printercu commented 1 day ago

0.16.5 works with rails 8.0