kurtsson / jekyll-multiple-languages-plugin

I18n support for Jekyll and Octopress
MIT License
925 stars 202 forks source link

fix: check if static_file_r_path is set #102

Closed binarious closed 5 years ago

binarious commented 6 years ago

As I mentioned in https://github.com/Anthony-Gaudino/jekyll-multiple-languages-plugin/issues/96 I got the following error when I was trying to run bundle exec jekyll serve:

NoMethodError: undefined method `[]=' for nil:NilClass
  /usr/local/lib/ruby/gems/2.4.0/gems/jekyll-multiple-languages-plugin-1.5.1/lib/jekyll-multiple-languages-plugin.rb:38:in `block (2 levels) in <module:Jekyll>'
  /usr/local/lib/ruby/gems/2.4.0/gems/jekyll-multiple-languages-plugin-1.5.1/lib/jekyll-multiple-languages-plugin.rb:34:in `delete_if'
  /usr/local/lib/ruby/gems/2.4.0/gems/jekyll-multiple-languages-plugin-1.5.1/lib/jekyll-multiple-languages-plugin.rb:34:in `block in <module:Jekyll>'
  /usr/local/lib/ruby/gems/2.4.0/gems/jekyll-3.5.1/lib/jekyll/hooks.rb:98:in `block in trigger'
  /usr/local/lib/ruby/gems/2.4.0/gems/jekyll-3.5.1/lib/jekyll/hooks.rb:97:in `each'
  /usr/local/lib/ruby/gems/2.4.0/gems/jekyll-3.5.1/lib/jekyll/hooks.rb:97:in `trigger'
  /usr/local/lib/ruby/gems/2.4.0/gems/jekyll-3.5.1/lib/jekyll/site.rb:197:in `render'
  /usr/local/lib/ruby/gems/2.4.0/gems/jekyll-3.5.1/lib/jekyll/site.rb:73:in `process'
  /usr/local/lib/ruby/gems/2.4.0/gems/jekyll-multiple-languages-plugin-1.5.1/lib/jekyll-multiple-languages-plugin.rb:125:in `block in process'
  /usr/local/lib/ruby/gems/2.4.0/gems/jekyll-multiple-languages-plugin-1.5.1/lib/jekyll-multiple-languages-plugin.rb:116:in `each'
  /usr/local/lib/ruby/gems/2.4.0/gems/jekyll-multiple-languages-plugin-1.5.1/lib/jekyll-multiple-languages-plugin.rb:116:in `process'
  /usr/local/lib/ruby/gems/2.4.0/gems/jekyll-3.5.1/lib/jekyll/command.rb:26:in `process_site'
  /usr/local/lib/ruby/gems/2.4.0/gems/jekyll-3.5.1/lib/jekyll/commands/build.rb:63:in `build'
  /usr/local/lib/ruby/gems/2.4.0/gems/jekyll-3.5.1/lib/jekyll/commands/build.rb:34:in `process'
  /usr/local/lib/ruby/gems/2.4.0/gems/jekyll-3.5.1/lib/jekyll/commands/serve.rb:40:in `block (3 levels) in init_with_program'
  /usr/local/lib/ruby/gems/2.4.0/gems/jekyll-3.5.1/lib/jekyll/commands/serve.rb:40:in `each'
  /usr/local/lib/ruby/gems/2.4.0/gems/jekyll-3.5.1/lib/jekyll/commands/serve.rb:40:in `block (2 levels) in init_with_program'
  /usr/local/lib/ruby/gems/2.4.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
  /usr/local/lib/ruby/gems/2.4.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
  /usr/local/lib/ruby/gems/2.4.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
  /usr/local/lib/ruby/gems/2.4.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
  /usr/local/lib/ruby/gems/2.4.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
  /usr/local/lib/ruby/gems/2.4.0/gems/jekyll-3.5.1/exe/jekyll:13:in `<top (required)>'
  /usr/local/bin/jekyll:23:in `load'
  /usr/local/bin/jekyll:23:in `<top (required)>'

And on another machine I get:

Error:  can't dup NilClass

Everything works fine for me after adding this checks.

Closes https://github.com/Anthony-Gaudino/jekyll-multiple-languages-plugin/issues/85

kurtsson commented 5 years ago

Hi @binarious. The main administrator @Anthony-Gaudino, has disappeared so we are in a bit of a sad state here. I still have access to the Ruby Gem and can release new versions but I do not use any Jekyll sites and have no way of verifying PRs. In short this project really need a new owner, is that you? Or can you atleast verify all PRs so I can merge and make a release?

binarious commented 5 years ago

Hi @kurtsson, sorry to hear that. I wouldn't be the right person for maintaining this plugin, because I'm not a ruby developer, but I'm happy to help verifying the PRs. This one looks good to me, but I don't know why this check fails: https://ci.appveyor.com/project/Anthony-Gaudino/jekyll-multiple-languages-plugin/build/1.0.17 I think it can be ignored.