Support for Ruby 3

10 views
Skip to first unread message

Dennis Bulgatz

unread,
Feb 15, 2023, 10:23:46 PM2/15/23
to ActiveScaffold : Ruby on Rails Gem
Hi,

Tried to run an existing application using Ruby 3.0.4 and rails 6.1.7.2.  


Is this specific to my app, or is ActiveScaffold not tested for Ruby 3?

Dennis

NoMethodError in Devise::Sessions#new

Showing /Users/dbulgatz/t3mis2/app/views/devise/sessions/new.html.erb where line # raised:

undefined method `index' for {/%a/=>"D", /%A/=>"DD", /%b/=>"M", /%B/=>"MM", /%d/=>"dd", /%e|%-d/=>"d", /%j/=>"oo", /%m/=>"mm", /%-m|%-m/=>"m", /%y/=>"y", /%Y/=>"yy", /%H/=>"HH", /%I/=>"hh", /%M/=>"mm", /%p/=>"tt", /%S/=>"ss", /%z/=>"z", /%[cUWwxXZ]/=>""}:Hash Did you mean? index_by
Extracted source (around line #86):

84 85 86 87 88 89
def self.to_datepicker_format(rails_format)
return nil if rails_format.nil?
unsupported = DATE_FORMAT_CONVERSION.index ''
if rails_format =~ unsupported
options = unsupported.to_s.scan(/\[(.*)\]/).dig(0, 0)&.each_char&.map { |c| "%#{c}" }
Rails.logger.warn(

Rails.root: /Users/dbulgatz/t3mis2

Application Trace | Framework Trace | Full Trace
active_scaffold (3.6.17) lib/active_scaffold/bridges/date_picker/helper.rb:86:in `to_datepicker_format'
active_scaffold (3.6.17) lib/active_scaffold/bridges/date_picker/helper.rb:51:in `date_options'
active_scaffold (3.6.17) lib/active_scaffold/bridges/date_picker/helper.rb:27:in `block in date_options_for_locales'
active_scaffold (3.6.17) lib/active_scaffold/bridges/date_picker/helper.rb:26:in `collect'
active_scaffold (3.6.17) lib/active_scaffold/bridges/date_picker/helper.rb:26:in `date_options_for_locales'
active_scaffold (3.6.17) lib/active_scaffold/bridges/date_picker.rb:23:in `localization'
active_scaffold (3.6.17) app/assets/javascripts/jquery/date_picker_bridge.js.erb:3:in `call'
/Users/dbulgatz/.rbenv/versions/3.0.4/lib/ruby/3.0.0/erb.rb:905:in `eval'
/Users/dbulgatz/.rbenv/versions/3.0.4/lib/ruby/3.0.0/erb.rb:905:in `result'
sprockets (4.2.0) lib/sprockets/erb_processor.rb:33:in `call'

Sergio Cambra

unread,
Feb 16, 2023, 5:10:06 AM2/16/23
to ActiveScaffold : Ruby on Rails Gem, 'Dennis Bulgatz' via ActiveScaffold : Ruby on Rails Gem
Hi Dennis

Master branch should work with ruby 3, v3.6.x don't support it. There are
changes on master branch related to ruby 3 support, and CI is testing
(although tests don't fully cover AS yet). Master is pretty stable, I will
release a new minor version soon, so you should be good using master until
then.

Best regards

El jueves, 16 de febrero de 2023 4:23:46 (CET) 'Dennis Bulgatz' via
ActiveScaffold : Ruby on Rails Gem escribió:
> Hi,
>
> Tried to run an existing application using Ruby 3.0.4 and rails 6.1.7.2.
>
> Got stuck here: active_scaffold (3.6.17)
> lib/active_scaffold/bridges/date_picker/helper.rb:86:in
> `to_datepicker_format' <http://localhost:8001/users/sign_in#>
>
> Is this specific to my app, or is ActiveScaffold not tested for Ruby 3?
>
> Dennis
>
> NoMethodError in Devise::Sessions#new
>
> Showing */Users/dbulgatz/t3mis2/app/views/devise/sessions/new.html.erb*
> where line *#* raised:
> undefined method `index' for {/%a/=>"D", /%A/=>"DD", /%b/=>"M", /%B/=>"MM",
> /%d/=>"dd", /%e|%-d/=>"d", /%j/=>"oo", /%m/=>"mm", /%-m|%-m/=>"m",
> /%y/=>"y", /%Y/=>"yy", /%H/=>"HH", /%I/=>"hh", /%M/=>"mm", /%p/=>"tt",
> /%S/=>"ss", /%z/=>"z", /%[cUWwxXZ]/=>""}:Hash Did you mean? index_by
> Extracted source (around line *#86*):
>
> 84 85 86 87 88 89
> def self.to_datepicker_format(rails_format)
> return nil if rails_format.nil?
> unsupported = DATE_FORMAT_CONVERSION.index ''
> if rails_format =~ unsupported
> options = unsupported.to_s.scan(/\[(.*)\]/).dig(0, 0)&.each_char&.map { |c|
> "%#{c}" }
> Rails.logger.warn(
>
> Rails.root: /Users/dbulgatz/t3mis2
> Application Trace <http://localhost:8001/users/sign_in#> | Framework Trace
> <http://localhost:8001/users/sign_in#> | Full Trace
> <http://localhost:8001/users/sign_in#>
> active_scaffold (3.6.17)
> lib/active_scaffold/bridges/date_picker/helper.rb:86:in
> `to_datepicker_format' <http://localhost:8001/users/sign_in#>
> active_scaffold (3.6.17)
> lib/active_scaffold/bridges/date_picker/helper.rb:51:in `date_options'
> <http://localhost:8001/users/sign_in#>
> active_scaffold (3.6.17)
> lib/active_scaffold/bridges/date_picker/helper.rb:27:in `block in
> date_options_for_locales' <http://localhost:8001/users/sign_in#>
> active_scaffold (3.6.17)
> lib/active_scaffold/bridges/date_picker/helper.rb:26:in `collect'
> <http://localhost:8001/users/sign_in#>
> active_scaffold (3.6.17)
> lib/active_scaffold/bridges/date_picker/helper.rb:26:in
> `date_options_for_locales' <http://localhost:8001/users/sign_in#>
> active_scaffold (3.6.17) lib/active_scaffold/bridges/date_picker.rb:23:in
> `localization' <http://localhost:8001/users/sign_in#>
> active_scaffold (3.6.17)
> app/assets/javascripts/jquery/date_picker_bridge.js.erb:3:in `call'
> <http://localhost:8001/users/sign_in#>
> /Users/dbulgatz/.rbenv/versions/3.0.4/lib/ruby/3.0.0/erb.rb:905:in `eval'
> <http://localhost:8001/users/sign_in#>
> /Users/dbulgatz/.rbenv/versions/3.0.4/lib/ruby/3.0.0/erb.rb:905:in `result'
> <http://localhost:8001/users/sign_in#>
> sprockets (4.2.0) lib/sprockets/erb_processor.rb:33:in `call'
> <http://localhost:8001/users/sign_in#>




Reply all
Reply to author
Forward
0 new messages