parasew/instiki

Ruby 2.5 Compatibility

Closed this issue · 4 comments

Rather naively I updated to the current Ubuntu LTS 18.04, but this broke Instiki.
Ruby 2.3 was unavailable from default repositories, so I investigated getting it to run under 2.5.
It does install without warnings, but when you run "instiki" it throws

instiki/vendor/rails/activesupport/lib/active_support/core_ext/bigdecimal/conversions.rb:16:in block in included': undefined method yaml_as' for BigDecimal:Class (NoMethodError)

which is no wonder, as yaml_as is long deprecated and should be yaml_tag as of Ruby 2.5. The problem is: If I change just this occurence of yaml_as to yaml_tag, I get instead this error:

instiki/vendor/rails/activesupport/lib/active_support/inflector.rb:3:in `require': cannot load such file -- iconv (LoadError)

The file at
https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb
looks rather different (no yaml_as or yaml_tag), so I don't know how to proceed.

In this commit the line with yaml_as is simply removed:
rails/rails@452dba7#diff-c6f87b8b0f89054619bb646c9387318c
But it doesn't change the next error message for me if I do this.

Sadly, I don't know any Ruby or Rails, so I can not fix this. Since this kind of problem has appeared in other projects, I would guess that simply updating Rails or the activesupport thing could make this work... but I also don't know how to do that.

If there is an easy way to get Instiki to run on Ruby 2.5 I would be very happy. It seems that this should be a somewhat long-term goal anyway, if Instiki is supposed to live longer...

In the meantime I will have to investigate installing Ruby 2.3 on Ubuntu 18.04 :-(

Thanks for the report. I will have to explore compatibility with Ruby 2.5.

Instiki does run fine under Ruby 2.4.

This commit should fix Ruby 2.5 compatibility.

Thank you very much, this worked instantly 👍

The Instiki website is now running on Ruby 2.5.1, so we'll see if any residual problems show up.

Thanks!