Closed houshuang closed 10 years ago
Are you using the unicode, the unicode_utils gem or active support? We're trying to load them here: https://github.com/inukshuk/citeproc-ruby/blob/0.0.x/lib/support/compatibility.rb#L27
@inukshuk I got a similar error. I am not if this is related to this package or the latex-decode
package. The build message can be found here on travis-ci. I don't have activesupport
or other packages explicitly included in my gem file. Is this related to your recent release of packages? I don't have this problem before.
@inukshuk Ok, it's a problem with latex-decode
v0.3.0. I rolled back to v0.2.2, and everything works again. The error code with v0.3.0 is
Liquid Exception: uninitialized constant ActiveSupport::Multibyte::Chars::Unicode Did you mean? UNIXSocket in /home/travis/build/[secure]/en/_posts/2016-07-23-put-everything-on-a-quantum-circuit-part-i.md
/home/travis/.rvm/gems/ruby-2.3.1/gems/activesupport-5.1.4/lib/active_support/multibyte/chars.rb:167:in `normalize': uninitialized constant ActiveSupport::Multibyte::Chars::Unicode (NameError)
Did you mean? UNIXSocket
from /home/travis/.rvm/gems/ruby-2.3.1/gems/latex-decode-0.3.0/lib/latex/decode/compatibility.rb:59:in `normalize_C'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/latex-decode-0.3.0/lib/latex/decode.rb:51:in `decode'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/bibtex-ruby-4.4.4/lib/bibtex/filters/latex.rb:8:in `apply'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/bibtex-ruby-4.4.4/lib/bibtex/value.rb:276:in `block (2 levels) in convert!'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/bibtex-ruby-4.4.4/lib/bibtex/value.rb:276:in `map!'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/bibtex-ruby-4.4.4/lib/bibtex/value.rb:276:in `block in convert!'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/bibtex-ruby-4.4.4/lib/bibtex/value.rb:274:in `each'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/bibtex-ruby-4.4.4/lib/bibtex/value.rb:274:in `convert!'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/bibtex-ruby-4.4.4/lib/bibtex/entry.rb:621:in `block in convert!'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/bibtex-ruby-4.4.4/lib/bibtex/entry.rb:620:in `each_pair'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/bibtex-ruby-4.4.4/lib/bibtex/entry.rb:620:in `convert!'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/bibtex-ruby-4.4.4/lib/bibtex/entry.rb:613:in `convert'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/jekyll-scholar-5.10.3/lib/jekyll/scholar/utilities.rb:628:in `block in cite'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/jekyll-scholar-5.10.3/lib/jekyll/scholar/utilities.rb:625:in `map'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/jekyll-scholar-5.10.3/lib/jekyll/scholar/utilities.rb:625:in `cite'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/jekyll-scholar-5.10.3/lib/jekyll/scholar/tags/cite.rb:20:in `render'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/liquid-3.0.6/lib/liquid/block.rb:151:in `render_token'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/liquid-3.0.6/lib/liquid/profiler/hooks.rb:5:in `block in render_token_with_profiling'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/liquid-3.0.6/lib/liquid/profiler.rb:80:in `profile_token_render'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/liquid-3.0.6/lib/liquid/profiler/hooks.rb:4:in `render_token_with_profiling'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/liquid-3.0.6/lib/liquid/block.rb:135:in `block in render_all'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/liquid-3.0.6/lib/liquid/block.rb:122:in `each'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/liquid-3.0.6/lib/liquid/block.rb:122:in `render_all'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/liquid-3.0.6/lib/liquid/block.rb:108:in `render'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/liquid-3.0.6/lib/liquid/template.rb:210:in `block in render'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/liquid-3.0.6/lib/liquid/template.rb:262:in `with_profiling'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/liquid-3.0.6/lib/liquid/template.rb:209:in `render'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/liquid-3.0.6/lib/liquid/template.rb:222:in `render!'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/jekyll-3.1.6/lib/jekyll/liquid_renderer/file.rb:28:in `block (2 levels) in render!'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/jekyll-3.1.6/lib/jekyll/liquid_renderer/file.rb:36:in `measure_bytes'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/jekyll-3.1.6/lib/jekyll/liquid_renderer/file.rb:27:in `block in render!'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/jekyll-3.1.6/lib/jekyll/liquid_renderer/file.rb:43:in `measure_time'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/jekyll-3.1.6/lib/jekyll/liquid_renderer/file.rb:26:in `render!'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/jekyll-3.1.6/lib/jekyll/renderer.rb:106:in `render_liquid'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/jekyll-3.1.6/lib/jekyll/renderer.rb:61:in `run'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/jekyll-3.1.6/lib/jekyll/site.rb:171:in `block (2 levels) in render'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/jekyll-3.1.6/lib/jekyll/site.rb:169:in `each'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/jekyll-3.1.6/lib/jekyll/site.rb:169:in `block in render'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/jekyll-3.1.6/lib/jekyll/site.rb:168:in `each'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/jekyll-3.1.6/lib/jekyll/site.rb:168:in `render'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/jekyll-3.1.6/lib/jekyll/site.rb:59:in `process'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/jekyll-3.1.6/lib/jekyll/command.rb:26:in `process_site'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/jekyll-3.1.6/lib/jekyll/commands/build.rb:60:in `build'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/jekyll-3.1.6/lib/jekyll/commands/build.rb:33:in `process'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/jekyll-3.1.6/lib/jekyll/commands/build.rb:16:in `block (2 levels) in init_with_program'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
from /home/travis/.rvm/gems/ruby-2.3.1/gems/jekyll-3.1.6/bin/jekyll:13:in `<top (required)>'
from /home/travis/.rvm/gems/ruby-2.3.1/bin/jekyll:23:in `load'
from /home/travis/.rvm/gems/ruby-2.3.1/bin/jekyll:23:in `<main>'
from /home/travis/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `eval'
from /home/travis/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `<main>'
This is the result of running bundle exec jekyll serve
. My Gemfile is
source "https://rubygems.org/"
gem "rake"# , "~> 10.2.1"
gem "jekyll", "~> 3.1.0"#, '~>2.5.3' #
gem "jekyll-assets" #, "~> 0.7.6"
gem "jekyll-scholar" #, "~> 5.8.1" #~>2.0.0
gem "jekyll-pandoc" #, "~> 0.0.1"
gem 'pandoc-ruby' #, '~> 0.7.5'
gem 'psych' #, '~> 2.0.5'
gem "json" #, '~>1.8'
gem "octokit"#, "~> 2.0" # Github API (octokit plugin)
gem "twitter"#, "~> 5.8.0" # Twitter API
gem "nokogiri", "~>1.6.8" # HTML / XML parser
gem "feedjira" # Atom/RSS parser
gem "chronic" # Natural language time parser
gem 'jekyll-twitter-plugin' # For twitter API.
gem "git" # Git gem
gem "redcarpet"
#gem 'pygments.rb', '~> 0.6.0'
## Working locally only
gem "garb" #, "~> 0.9.8" # Google Analytics API
gem 'redis'
gem 'classifier-reborn', '>=2.0.4' #, :git => "https://github.com/jekyll/classifier-reborn" # To fix the equal sign warning.
gem 'narray' #, :git => "https://github.com/tonyarnold/narray"
#gem 'nmatrix'
gem 'rb-gsl', '~> 1.16', '>= 1.16.0.6'
#gem 'gsl', :git => "https://github.com/tonyarnold/rb-gsl"
#gem 'gsl', :git => 'git://github.com/siefca/rb-gsl'
Any insight will be appreciated!
I pushed latex-decode 0.3.1 which will hopefully fix the issue for you.
@inukshuk Unfortunately, the fix didn't work for my case. I am using Ruby 2.3, though. The full log can be found on travis-ci.
Ah, there was a similar issue in the citeproc gem -- please install version 1.0.6 and hopefully that will be all (these errors are basically just because of some unicode helpers we've been using in the old days and which are built-in starting with Ruby 2.3)
@inukshuk Great! All seems to have been working now.Thank you for taking care of multiple repos. I wouldn't be able to find the solution without your help :)
@inukshuk Just a followup: I tested the solution with ruby 2.2.2, but it failed. So, what's the minimum version of Ruby the citation packages required? Or, maybe I have missed something. The travis-CI build is linked for your reference. Thanks.
Well, we try to load the unicode
Gem or fallback to an implementation in ActiveSupport
-- which is not available any more in later versions, likely because they dropped support for older versions of Ruby.
Right now, we're checking for Ruby 2.3 or later (in this case we're just using the built-in features); for anything older than 2.3 we use the original alternatives. The easiest thing is probably to install the unicode
Gem on anything older than 2.3. Alternatively you could install ActiveSupport but you'd have to figure out exactly which version (because the latest versions will not work).
Adding unicode
gem works. Thanks.
I get tons of these kinds of errors when running under Ruby 2.0:
ERROR CiteProc : failed to format string "vols.": uninitialized constant ActiveSupport::Multibyte::Chars::Unicode ERROR CiteProc : failed to format string "vol.": uninitialized constant ActiveSupport::Multibyte::Chars::Unicode ERROR CiteProc : failed to format string "retrieved": uninitialized constant ActiveSupport::Multibyte::Chars::Unicode ERROR CiteProc : failed to format string "vols.": uninitialized constant ActiveSupport::Multibyte::Chars::Unicode ERROR CiteProc : failed to format string "vol.": uninitialized constant ActiveSupport::Multibyte::Chars::Unicode ERROR CiteProc : failed to format string "retrieved": uninitialized constant ActiveSupport::Multibyte::Chars::Unicode