Using planet.rb plugin - not as a Gem

A plugin I’m using is called planet.rb. I discovered it on this forum last year.

I need to begin modifying it for a Jekyll project I’m working on. I do not want to fork it’s Gem unless that’s the only way. If my modifications turn out to be potentially useful to others I’ll package it up. Meanwhile trying to avoid these steps. If possible.

From the three methods listed at Jekyll I want to use the first method for this plugin (trapped in the body of a Gem).

I’ve assumed I can edit these Gem files then ‘build jekyll’ to see changes.

I’ve attempted to:

  • then run ‘jekyll build’

As you experts might expect.

Dependency Error: Yikes! It looks like you don’t have /Users/…/_plugins/planet/blog.rb or one of its dependencies installed. In order to use Jekyll as currently configured, you’ll need to install this gem. The full error message from Ruby is: ‘cannot load such file – sanitize’ If you run into trouble, you can find helpful resources at Redirecting…!

Clearly I don’t know what I’m doing. I’m unsure how whether planet.rb is in any form to be run directly from the _plugins folder or how I might make that happen.

Thanks for your time. Glad this forum is coming back to life after the wipe.

Currently considering:

Hi, the issue here will be clear if you take a look at Planet’s .gemspec file. What it simply means is that in addition to the files present in the /lib folder, the files present in each of the ‘gems’ listed there are also required for it to run. Hence called, runtime_dependencies.

Times have changed and things got simpler. Now, with a gem called Bundler and a file called Gemfile, all of those will be easily aquirable.

  1. install Bundler
gem install bundler
  1. Running jekyll new would have already produced a Gemfile in your project directory. If not, run bundle init and add the following to it:
    gem "jekyll", "~> 3.4"

    group :jekyll_plugins do
      gem "planet", "~> 0.5"
    end
  1. move into your project directory by running cd my_project

  2. Run bundle install to install the required gems.

  3. Then use bundler to run jekyll

bundle exec jekyll serve

A