Using custom ruby gem with github pages throws error


Using custom gem with github-pages throws following error when running jekyll build

C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.12.5/lib/bundler/resolver.rb:356:in `block in verify_gemfile_dependencies_are_found!': Could not find gem 'tabs (= 0.0.3) x86-mingw32' in any of the gem sources listed in your Gemfile or available on this machine. (Bundler::GemNotFound)
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.12.5/lib/bundler/resolver.rb:331:in `each'
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.12.5/lib/bundler/resolver.rb:331:in `verify_gemfile_dependencies_are_found!'
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.12.5/lib/bundler/resolver.rb:200:in `start'
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.12.5/lib/bundler/resolver.rb:184:in `resolve'
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.12.5/lib/bundler/definition.rb:200:in `resolve'
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.12.5/lib/bundler/definition.rb:140:in `specs'
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.12.5/lib/bundler/definition.rb:185:in `specs_for'
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.12.5/lib/bundler/definition.rb:174:in `requested_specs'
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.12.5/lib/bundler/environment.rb:19:in `requested_specs'
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:14:in `setup'
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.12.5/lib/bundler.rb:95:in `setup'
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-3.2.1/lib/jekyll/plugin_manager.rb:36:in `require_from_bundler'
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-3.2.1/exe/jekyll:9:in `<top (required)>'
    from C:/Ruby200/bin/jekyll:23:in `load'
    from C:/Ruby200/bin/jekyll:23:in `<main>'

My Gemfile

source ""
gem 'kramdown'
gem 'jekyll-sitemap'
gem 'nokogiri'
gem 'tabs', '0.0.3'
gem 'tabs-id', '0.0.1'

Last two gems were created by me.

And this is my ruby gem file

require 'kramdown'
module Tags
    class TabsBlock < Liquid::Block
        def render(context)
            content = super(context)
            content = convert(content)
        def convert(context)
            liArray = context.gsub(/<li role="presentation" class="">(.+)<\/li>/)
            nextLine = "\n"
            tabOpenTag = nextLine + '<div class="tabs">' + nextLine
            ulOpenTag = nextLine + '<ul class="nav nav-tabs" role="tablist">' + nextLine
            tabContentOpenTag = nextLine + '<div class="tab-content">' + nextLine
            closedivTag = nextLine + '</div>' + nextLine
            ulCloseTag = nextLine + '</ul>' + nextLine
            lis = '' + nextLine
            liArray.each do|li|
                lis = lis + li + nextLine
            return tabOpenTag + ulOpenTag + lis + ulCloseTag + tabContentOpenTag +context.gsub(/<li role="presentation" class="">(.+)<\/li>/,'') + closedivTag + ulCloseTag + closedivTag

Liquid::Template.register_tag("tabs", Tags::TabsBlock)

Show source
| ruby   | rubygems   | jekyll   | gemfile   | github-pages   2016-10-11 13:10 1 Answers

Answers to Using custom ruby gem with github pages throws error ( 1 )

  1. 2016-10-11 16:10

    You cannot use any additional ruby gems in Github Pages other than the gem github-pages.

    You Gemfile should read:

    source ''
    gem 'github-pages', group: :jekyll_plugins

Leave a reply to - Using custom ruby gem with github pages throws error

◀ Go back