Last active
June 1, 2021 01:11
-
-
Save rafaelss/5ed21e59ad2cc5d82acf4b089b5697af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "bundler/inline" | |
gemfile do | |
source "https://rubygems.org" | |
ruby "2.7.3" | |
gem "liquid", "5.0.1", require: false | |
gem 'liquid-c', github: 'Shopify/liquid-c', ref: 'fb25228', require: false | |
end | |
require "liquid/c" | |
require "liquid" | |
variables = { 'name' => 'Rafael' } | |
template = Liquid::Template.new | |
template.parse('{{ name | unknown }}', error_mode: :strict) | |
puts template.render!(variables, strict_variables: true, strict_filters: true) | |
# Rafael |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "bundler/inline" | |
gemfile do | |
source "https://rubygems.org" | |
ruby "2.7.3" | |
gem "liquid", "5.0.1", require: false | |
gem 'liquid-c', github: 'Shopify/liquid-c', ref: 'fef8329', require: false | |
end | |
require "liquid/c" | |
require "liquid" | |
variables = { 'name' => 'Rafael' } | |
template = Liquid::Template.new | |
template.parse('{{ name | unknown }}', error_mode: :strict) | |
puts template.render!(variables, strict_variables: true, strict_filters: true) | |
# Traceback (most recent call last): | |
# 4: from working.rb:16:in `<main>' | |
# 3: from /Users/rafael/.gem/ruby/2.7.3/gems/liquid-5.0.1/lib/liquid/template.rb:205:in `render!' | |
# 2: from /Users/rafael/.gem/ruby/2.7.3/gems/liquid-5.0.1/lib/liquid/template.rb:195:in `render' | |
# 1: from /Users/rafael/.gem/ruby/2.7.3/gems/liquid-5.0.1/lib/liquid/document.rb:41:in `render_to_output_buffer' | |
# /Users/rafael/.gem/ruby/2.7.3/gems/liquid-5.0.1/lib/liquid/document.rb:41:in `render_to_output_buffer': Liquid error: undefined filter unknown (Liquid::UndefinedFilter) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment