Rails 8.1 incompatilibity: undefined method 'config_accessor' for class Telegram::Bot::UpdatesController (NoMethodError)
Hello, dear maintainers!
looks like the gem ain't compatible with Rails 8.1 beta.
.rbenv/versions/3.4.5/lib/ruby/gems/3.4.0/gems/telegram-bot-0.16.7/lib/telegram/bot/updates_controller/instrumentation.rb:12:in 'block in <module:Instrumentation>': undefined method 'config_accessor' for class Telegram::Bot::UpdatesController (NoMethodError)
Appreciate your efforts 🙇
@mprokopov Found exactly the same problem, thx for the pull request. Would appreciate a merge.
Rails 8.1 final results in
Because every version of telegram-bot depends on activesupport >= 4.0, < 8.1
and activejob >= 8.1.0 depends on activesupport = 8.1.0,
every version of telegram-bot is incompatible with activejob >= 8.1.0.
So, because Gemfile depends on activejob = 8.1.0
and Gemfile depends on telegram-bot >= 0,
version solving has failed.
@mprokopov I think you have to update the gemspec as well in the PR
Good catch, @thomaswitt, thanks!
Dropped limiting conditions, let me know if it should be handled differently
@mprokopov Do you also keep on getting " DEPRECATION WARNING: post received a hash argument to. Please use a keyword instead. Support to hash argument will be removed in Rails 8.2." when using telegram_webhook TelegramWebhooksController?
I guess it's because of https://github.com/telegram-bot-rb/telegram-bot/blob/master/lib/telegram/bot/routes_helper.rb and the params hash.
Thanks @thomaswitt
dropped a fix for the warning to the same PR