Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to fix Ruby getting load path with stray utf-8 character
    primarykey
    data
    text
    <p>I've got a system that after a little use will result in Ruby being unable to run because of the following error</p> <pre><code>ruby: No such file or directory -- ¯ (LoadError) </code></pre> <p>The last few characters after the <code>--</code> and before the <code>(LoadError)</code> are a sequence of utf-8 characters. If I keep running ruby I'll get a different few characters each time. Eventually it will pollute my whole shell and I have prompts like the following</p> <pre><code>⎼┤b≤: N⎺ ⎽┤c▒ °☃┌e ⎺⎼ d☃⎼ec├⎺⎼≤ ↑↑ (L⎺▒dE⎼⎼⎺⎼) [┘┘▒⎽⎺┼c┌▒⎼┐@┌⎺≤▒┌├≤↑de┴↑┘┘▒⎽⎺┼c┌▒⎼┐ c┤⎼⎼e┼├]$ </code></pre> <p>How do I solve this? How does it get this way in the first place?</p> <h2>Notes</h2> <ul> <li>When the text is messed up I can highlight it in Tmux and see what should really be there.</li> <li>Pressing ctrl+v ctrl+o causes the error at the prompt to go away until I run <code>ruby</code> again.</li> <li>Condition persist through reboots</li> <li>System is provisioned with chef. That stops once this condition happens because chef uses ruby</li> <li>The prompt only goes nuts inside of Tmux. If I use a new terminal without Tmux then the utf-8 error only happens on the error line. The prompt line always stays correct.</li> <li>LANG is set to en_US.UTF-8</li> <li><p>Sometimes the extra characters look like part of a configuration file.</p> <pre><code>/usr/bin/ruby: No such file or directory -- cxxflags (LoadError) </code></pre> <p>This shows <code>cxxflag</code>. I have also seen <code>CC</code> before too.</p></li> <li>The machine is a VM. Rebooting it or the host didn't fix the issue</li> <li>Ruby version 1.9.3-p429</li> <li>Using CentOs 5.9</li> <li>/etc/sysctrl/i18n is setting the LANG to en_US.UTF-8</li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload