Open Mariu5 opened 7 years ago
Will investigate later today. I assume it's a dependency issue or something like that.
Same error here with Jekyll 3.3.1
any solutions found?
I am getting the same error using Jekyll 3.3.1 - @abeMedia can you point me to a repo where this is working so I can compare it with my local repo?
I got this too using Jekyll 3.3.1. Fixed by adding jekyll-assets
.
Gemfile:
gem 'jekyll-assets'
gem 'jekyll-pdf'
_config.yml:
gems:
- jekyll-assets
- jekyll-pdf
@tersor Any chance you could link to the repo that you have this working in? I have added jekyll-assets to the gemfile and config and am still getting the same error as before when I run jekyll build. Also running Jekyll 3.3.1.
Having the same issue (Jekyll 3.3.1) has anyone found a solution? I also added -jekyll-assets but it did not help
Same issue here with Jekyll 3.4.1
same isuue, jekyll 3.4.3
I did what @tersor suggested, it worked, then I ran into Issue #8. :(
Those of you for whom it's not working, make sure you added jekyll-assets
to _config.yml
.
After I did what @tersor suggested
Gemfile:
gem 'jekyll-assets'
gem 'jekyll-pdf'
_config.yml:
gems:
- jekyll-assets
- jekyll-pdf
I ran into this error
jekyll 3.5.0 | Error: undefined method `data' for nil:NilClass
I have the same issue as @shivabhusal
Using jekyll 3.5.1
No fixes? :(
@shivabhusal @TheOddler it can be fixed by setting existing layout in config for pdf.
@zhulik I tried to set it like this but it didn't work..
pdf:
layout: pdf
Also updated my gems with bundle update. Still getting this
jekyll 3.6.2 | Error: undefined method `data' for nil:NilClass
bundle resolved this to a very old version of jekyll-assets because some other gem (jekyll-picture-tag) required an older version of fastimage (1.6). Newer versions of jekyll-assets, with try_require, need fastimage ~> 1.8.
So just fix your jekyll-assets version to ~> 2, run bundle install, and see what's conflicting.
@tomstaijen – this worked for me! Thanks!
I had this working until I upgraded to jekyll 3.7.0. Now:
/usr/local/lib/ruby/gems/2.4/gems/jekyll-pdf-0.1.7/lib/jekyll/pdf/liquid/tags/jekyll-assets.rb:1:in <top (required)>': undefined method
try_require' for main:Object (NoMethodError)
from /usr/local/lib/ruby/site_ruby/2.4/rubygems/core_ext/kernel_require.rb:59:in require' from /usr/local/lib/ruby/site_ruby/2.4/rubygems/core_ext/kernel_require.rb:59:in
require'
from /usr/local/lib/ruby/gems/2.4/gems/jekyll-pdf-0.1.7/lib/jekyll/pdf.rb:1:in block in <top (required)>' from /usr/local/lib/ruby/gems/2.4/gems/jekyll-pdf-0.1.7/lib/jekyll/pdf.rb:1:in
each'
from /usr/local/lib/ruby/gems/2.4/gems/jekyll-pdf-0.1.7/lib/jekyll/pdf.rb:1:in <top (required)>' from /usr/local/lib/ruby/site_ruby/2.4/rubygems/core_ext/kernel_require.rb:59:in
require'
from /usr/local/lib/ruby/site_ruby/2.4/rubygems/core_ext/kernel_require.rb:59:in require' from /usr/local/lib/ruby/gems/2.4/gems/jekyll-pdf-0.1.7/lib/jekyll-pdf.rb:1:in
<top (required)>'
from /usr/local/lib/ruby/site_ruby/2.4/rubygems/core_ext/kernel_require.rb:135:in require' from /usr/local/lib/ruby/site_ruby/2.4/rubygems/core_ext/kernel_require.rb:135:in
rescue in require'
from /usr/local/lib/ruby/site_ruby/2.4/rubygems/core_ext/kernel_require.rb:39:in require' from /usr/local/lib/ruby/gems/2.4/gems/jekyll-3.7.0/lib/jekyll/external.rb:58:in
block in require_with_graceful_fail'
from /usr/local/lib/ruby/gems/2.4/gems/jekyll-3.7.0/lib/jekyll/external.rb:55:in each' from /usr/local/lib/ruby/gems/2.4/gems/jekyll-3.7.0/lib/jekyll/external.rb:55:in
require_with_graceful_fail'
from /usr/local/lib/ruby/gems/2.4/gems/jekyll-3.7.0/lib/jekyll/plugin_manager.rb:30:in require_gems' from /usr/local/lib/ruby/gems/2.4/gems/jekyll-3.7.0/lib/jekyll/plugin_manager.rb:22:in
conscientious_require'
from /usr/local/lib/ruby/gems/2.4/gems/jekyll-3.7.0/lib/jekyll/site.rb:113:in setup' from /usr/local/lib/ruby/gems/2.4/gems/jekyll-3.7.0/lib/jekyll/site.rb:34:in
initialize'
from /usr/local/lib/ruby/gems/2.4/gems/jekyll-3.7.0/lib/jekyll/commands/build.rb:30:in new' from /usr/local/lib/ruby/gems/2.4/gems/jekyll-3.7.0/lib/jekyll/commands/build.rb:30:in
process'
from /usr/local/lib/ruby/gems/2.4/gems/jekyll-3.7.0/lib/jekyll/commands/build.rb:18:in block (2 levels) in init_with_program' from /usr/local/lib/ruby/gems/2.4/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in
block in execute'
from /usr/local/lib/ruby/gems/2.4/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in each' from /usr/local/lib/ruby/gems/2.4/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in
execute'
from /usr/local/lib/ruby/gems/2.4/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in go' from /usr/local/lib/ruby/gems/2.4/gems/mercenary-0.3.6/lib/mercenary.rb:19:in
program'
from /usr/local/lib/ruby/gems/2.4/gems/jekyll-3.7.0/exe/jekyll:15:in <top (required)>' from /usr/local/bin/jekyll:23:in
load'
from /usr/local/bin/jekyll:23:in `
%gem list
LOCAL GEMS
activesupport (5.1.4) addressable (2.5.2) colorator (1.1.0) concurrent-ruby (1.0.5) digest (0.0.1) em-websocket (0.5.1) eventmachine (1.2.5) execjs (2.7.0) extras (0.3.0) fastimage (2.1.1) ffi (1.9.18) flvtool2 (1.0.6) forwardable-extended (2.6.0) http_parser.rb (0.6.0) i18n (0.9.1) jekyll (3.7.0) jekyll-assets (3.0.5) jekyll-paginate (1.1.0) jekyll-pdf (0.1.7) jekyll-sanity (1.2.0) jekyll-sass-converter (1.5.1) jekyll-watch (2.0.0) kramdown (1.16.2) liquid (4.0.0) liquid-tag-parser (1.8.0) listen (3.1.5) mercenary (0.3.6) minitest (5.11.1) nokogiri (1.8.1) pathutil (0.16.1) pdfkit (0.8.2) pkg-config (1.2.8) public_suffix (3.0.1) rack (1.6.8) rb-fsevent (0.10.2) rb-inotify (0.9.10) rb-kqueue (0.2.5) rouge (2.2.1) ruby_dep (1.5.0) safe_yaml (1.0.4) sass (3.5.5) sass-listen (4.0.0) sprockets (3.7.1) thread_safe (0.3.6) tzinfo (1.2.4)
My problem turned out to be with the new version of jekyll-assets (3.0.5). I had also recently upgraded ruby and had to reinstall all the gems since I last used jekyll-pdf. I dropped back to jekyll-assets 2.4.0 and things are now working again. I don't know if the earlier 3.0.x versions of jekyll-assets work.
Fixed in this PR - https://github.com/abeMedia/jekyll-pdf/pull/17
see https://github.com/abeMedia/jekyll-pdf/issues/24
it also contains mneumegen's fix for this issue
I got an Error if i try bulid the site with Jekyll 3.3.0
An idea what caused this?