diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2019-08-06 12:02:28 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2019-08-06 12:02:28 +0200 |
commit | 516576e5480f3ba8956a6008a1d3709a78efcc15 (patch) | |
tree | 779d14a4e65cb4a9bb99bc7c248b6095a8de1e8f /config/initializers/arel-workaround.rb | |
parent | bc46fe6f93736f4a7cc7cdc1ff2a487c636f37d1 (diff) | |
download | hmnoweb-516576e5480f3ba8956a6008a1d3709a78efcc15.tar.gz hmnoweb-516576e5480f3ba8956a6008a1d3709a78efcc15.tar.bz2 hmnoweb-516576e5480f3ba8956a6008a1d3709a78efcc15.zip |
Emergency fixes to make hmno run on freebsd 12.
Upgrade to use Ruby 2.5.5.
Use patched version of rails/activerecord/postgres-adapter that should
fix compatibility with Ruby 2.5.
Patch Arel inline to be compatible with Ruby 2.5.
Diffstat (limited to 'config/initializers/arel-workaround.rb')
-rw-r--r-- | config/initializers/arel-workaround.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/config/initializers/arel-workaround.rb b/config/initializers/arel-workaround.rb new file mode 100644 index 0000000..67f99f2 --- /dev/null +++ b/config/initializers/arel-workaround.rb @@ -0,0 +1,17 @@ +# Workaround to get Arel to work with newer versions of ruby +# from: https://stackoverflow.com/a/44286212 +module Arel + module Visitors + class DepthFirst < Arel::Visitors::Visitor + alias :visit_Integer :terminal + end + + class Dot < Arel::Visitors::Visitor + alias :visit_Integer :visit_String + end + + class ToSql < Arel::Visitors::Visitor + alias :visit_Integer :literal + end + end +end |