kurtsson / jekyll-multiple-languages-plugin

I18n support for Jekyll and Octopress
MIT License
926 stars 203 forks source link

Jekyll 3 incompatibility? #52

Closed jamesmaniscalco closed 8 years ago

jamesmaniscalco commented 9 years ago

I just started a new Jekyll project hoping to use this plugin, but I'm getting an error right out of the box. It seems to be due to a call to read_posts, which has been deprecated in the new version.

Here is my stacktrace:

bundle exec jekyll build --trace
Configuration file: /path/to/my/jekyll/site/_config.yml
/usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/jekyll-multiple-languages-plugin-1.2.9/lib/jekyll/multiple/languages/plugin.rb:53:in `<class:Site>': undefined method `read_posts' for class `Jekyll::Site' (NameError)
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/jekyll-multiple-languages-plugin-1.2.9/lib/jekyll/multiple/languages/plugin.rb:11:in `<module:Jekyll>'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/jekyll-multiple-languages-plugin-1.2.9/lib/jekyll/multiple/languages/plugin.rb:3:in `<top (required)>'
    from /path/to/my/jekyll/site/_plugins/plugins.rb:1:in `require'
    from /path/to/my/jekyll/site/_plugins/plugins.rb:1:in `<top (required)>'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/jekyll-3.0.0/lib/jekyll/plugin_manager.rb:75:in `require'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/jekyll-3.0.0/lib/jekyll/plugin_manager.rb:75:in `block (2 levels) in require_plugin_files'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/jekyll-3.0.0/lib/jekyll/plugin_manager.rb:74:in `each'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/jekyll-3.0.0/lib/jekyll/plugin_manager.rb:74:in `block in require_plugin_files'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/jekyll-3.0.0/lib/jekyll/plugin_manager.rb:73:in `each'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/jekyll-3.0.0/lib/jekyll/plugin_manager.rb:73:in `require_plugin_files'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/jekyll-3.0.0/lib/jekyll/plugin_manager.rb:18:in `conscientious_require'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/jekyll-3.0.0/lib/jekyll/site.rb:97:in `setup'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/jekyll-3.0.0/lib/jekyll/site.rb:49:in `initialize'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/jekyll-3.0.0/lib/jekyll/commands/build.rb:30:in `new'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/jekyll-3.0.0/lib/jekyll/commands/build.rb:30:in `process'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/jekyll-3.0.0/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/mercenary-0.3.4/lib/mercenary/command.rb:220:in `call'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/mercenary-0.3.4/lib/mercenary/command.rb:220:in `block in execute'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/mercenary-0.3.4/lib/mercenary/command.rb:220:in `each'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/mercenary-0.3.4/lib/mercenary/command.rb:220:in `execute'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/mercenary-0.3.4/lib/mercenary/program.rb:35:in `go'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/mercenary-0.3.4/lib/mercenary.rb:22:in `program'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/jekyll-3.0.0/bin/jekyll:17:in `<top (required)>'
    from /usr/local/var/rbenv/versions/2.1.2/bin/jekyll:23:in `load'
    from /usr/local/var/rbenv/versions/2.1.2/bin/jekyll:23:in `<main>'
denizoguz commented 8 years ago

I have the same issue

wikiti commented 8 years ago

Same here.

ty0x2333 commented 8 years ago

Please release a new version.GitHub Page does not support local plug-in. #55 @kurtsson

Ruff9 commented 8 years ago

Same here. Looking for another plugin.

Glennvd commented 8 years ago

Same problem here, any ETA on a fix?

ghost commented 8 years ago

Here's my stacktrace:

WARN: Unresolved specs during Gem::Specification.reset:
      jekyll-watch (~> 1.1)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Configuration file: C:/Users/PixelZerg/Downloads/jekyll-multiple-languages-plugin-master/jekyll-multiple-languages-plugin-master/example/_config.yml
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-multiple-languages-plugin-1.3.0/lib/jekyll/multiple/languages/plugin.rb:53:in `': undefined method `read_posts' for class `Jekyll::Site' (NameError)
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-multiple-languages-plugin-1.3.0/lib/jekyll/multiple/languages/plugin.rb:11:in `'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-multiple-languages-plugin-1.3.0/lib/jekyll/multiple/languages/plugin.rb:3:in `'
        from C:/Users/PixelZerg/Downloads/jekyll-multiple-languages-plugin-master/jekyll-multiple-languages-plugin-master/example/_plugins/jekyll-multiple-languages-plugin.rb:1:in `require'
        from C:/Users/PixelZerg/Downloads/jekyll-multiple-languages-plugin-master/jekyll-multiple-languages-plugin-master/example/_plugins/jekyll-multiple-languages-plugin.rb:1:in `'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/external.rb:43:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/external.rb:43:in `block in require_with_graceful_fail'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/external.rb:40:in `each'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/external.rb:40:in `require_with_graceful_fail'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/plugin_manager.rb:70:in `block in require_plugin_files'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/plugin_manager.rb:68:in `each'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/plugin_manager.rb:68:in `require_plugin_files'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/plugin_manager.rb:18:in `conscientious_require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/site.rb:97:in `setup'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/site.rb:49:in `initialize'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/commands/build.rb:28:in `new'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/commands/build.rb:28:in `process'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/lib/jekyll/commands/build.rb:16:in `block (2 levels) in init_with_program'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `call'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `block in execute'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `each'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `execute'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in `go'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary.rb:19:in `program'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/jekyll-3.1.2/bin/jekyll:13:in `'
        from C:/Ruby22-x64/bin/jekyll:23:in `load'
        from C:/Ruby22-x64/bin/jekyll:23:in `
'
nwshane commented 8 years ago

I'm having this issue too. Any hope of an update soon? Plugin looks great but it's unusable at the moment...

equinusocio commented 8 years ago

@nwshane Same issue. This version works: https://raw.githubusercontent.com/Anthony-Gaudino/jekyll-multiple-languages-plugin/05b4d4e0de0e5bf71483049849b08f8aa290d4a2/lib/jekyll/multiple/languages/plugin.rb

PR at https://github.com/screeninteraction/jekyll-multiple-languages-plugin/pull/60

Anthony-Gaudino commented 8 years ago

Version 1.4.0 now supports Jekyll 3.