Skip to content
Russell Keane
Main Navigation HomePosts

Appearance

Sidebar Navigation

2025

February (1)

Dynamically setting prev and next links in Vitepress

2019

November (1)

CloudFormation template failing to deploy

2018

March (1)

Subst'ing a drive in Windows 7 / 10

January (1)

Groovy - unable to resolve class

2017

October (2)

Reordering pages in LIFERAY forms

Spring / ZUUL - Failed to introspect annotated methods

June (1)

Sourcetree stuck on POST (chunked)

March (1)

Turning off Windows 10 ads

2016

December (1)

Failure to install / update ruby gems

July (2)

PostgreSQL - Casting integer to interval

piggly trace- invalid multibyte escape

June (1)

Jenkins stuck on "Retrieving Git references..."

March (1)

Jenkins & Groovy - accessing build parameters

2015

November (2)

Creating a Jenkins slave as a Windows service

Why Jenkins?

On this page

Background: ​

After installing piggly (see here for instructions) I had to remove the latest version of piggly due to this issue:

shell
    gem uninstall piggly

and I thus installed version 1.2.1

shell
    gem install piggly -v '1.2.1'

Problem: ​

After installing v 1.2.1 I attempted to run piggly trace:

shell
    piggly trace

And was confronted with the following error:

shell
    C:/Ruby/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in `require': C:/Ruby/Ruby21-x64/lib/ruby/gems/2.1.
    0/gems/piggly-1.2.1/lib/piggly/compiler/cache.rb:23: invalid multibyte escape: /[\000-\010\016-\037\177-\300]/ (SyntaxError)
     from C:/Ruby/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in `require'
     from C:/Ruby/Ruby21-x64/lib/ruby/gems/2.1.0/gems/piggly-1.2.1/lib/piggly/compiler.rb:1:in `<top (required)>'
     from C:/Ruby/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in `require'
     from C:/Ruby/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in `require'
     from C:/Ruby/Ruby21-x64/lib/ruby/gems/2.1.0/gems/piggly-1.2.1/lib/piggly.rb:10:in `<top (required)>'
     from C:/Ruby/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
     from C:/Ruby/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
     from C:/Ruby/Ruby21-x64/lib/ruby/gems/2.1.0/gems/piggly-1.2.1/bin/piggly:5:in `<top (required)>'
     from C:/Ruby/Ruby21-x64/bin/piggly:23:in `load'
     from C:/Ruby/Ruby21-x64/bin/piggly:23:in `<main>'

The important bit here being:

shell
    compiler/cache.rb:23: invalid multibyte escape: /[\000-\010\016-\037\177-\300]/ (SyntaxError)

Fix: ​

In order to fix this I added the following line to the cache.rb file at "C:\Ruby\Ruby21-x64\lib\ruby\gems\2.1.0\gems\piggly-1.2.1\lib\piggly\compiler\cache.rb":

ruby
    # encoding: ASCII-8BIT

Note: This MUST be the first line in the file.

After adding this line and saving the file I re-ran piggly trace and it succeeded.

Resources: ​

Solution partially taken from here:

https://github.com/kputnam/piggly/issues/23

Pager
Previous pageJenkins stuck on "Retrieving Git references..."
Next pagePostgreSQL - Casting integer to interval

All views expressed are my own

Copyright © 2015-present Russell Keane