Having trouble using perlbrew to install perl 5.14.2 on OSX 10.8.0 - osx-mountain-lion

On the advice I've read here and elsewhere, I decided to stop running sudo cpan, thus affecting the system perl, and instead use perlbrew to install and manage private versions of perl.
I installed perlbrew and ran perlbrew install perl-5.14.2, both without and with --force. Both times it failed to install. Below is the test summary report.
Test Summary Report
-------------------
../ext/POSIX/t/posix.t (Wstat: 0 Tests: 66 Failed: 0)
TODO passed: 11
../lib/locale.t (Wstat: 0 Tests: 117 Failed: 1)
Failed test: 99
Files=2089, Tests=455813, 723 wallclock secs (55.63 usr 8.56 sys + 402.42 cusr 50.30 csys = 516.91 CPU)
Result: FAIL
Has anyone had success using perlbrew to install Perl on OSX 10.8, who can suggest what's going wrong?
[UPDATE]
I tried installing perl 5.12.4, and got the same results. Below are some details that seem to pertain to locale:
The following locales
#
# C C POSIX POSIX af_ZA af_ZA.ISO8859-1 af_ZA.ISO8859-15
# af_ZA.UTF-8 am_ET am_ET.UTF-8 be_BY be_BY.CP1131 be_BY.CP1251
# be_BY.ISO8859-5 be_BY.UTF-8 bg_BG bg_BG.CP1251 bg_BG.UTF-8
# ca_ES ca_ES.ISO8859-1 ca_ES.ISO8859-15 ca_ES.UTF-8 cs_CZ
# cs_CZ.ISO8859-2 cs_CZ.UTF-8 da_DK da_DK.ISO8859-1 da_DK.ISO8859-15
# da_DK.UTF-8 de_AT de_AT.ISO8859-1 de_AT.ISO8859-15
# de_AT.UTF-8 de_CH de_CH.ISO8859-1 de_CH.ISO8859-15
# de_CH.UTF-8 de_DE de_DE.ISO8859-1 de_DE.ISO8859-15
# de_DE.UTF-8 el_GR el_GR.ISO8859-7 el_GR.UTF-8 en_AU
# en_AU.ISO8859-1 en_AU.ISO8859-15 en_AU.US-ASCII en_AU.UTF-8
# en_CA en_CA.ISO8859-1 en_CA.ISO8859-15 en_CA.US-ASCII
# en_CA.UTF-8 en_GB en_GB.ISO8859-1 en_GB.ISO8859-15
# en_GB.US-ASCII en_GB.UTF-8 en_IE en_IE.UTF-8 en_NZ
# en_NZ.ISO8859-1 en_NZ.ISO8859-15 en_NZ.US-ASCII en_NZ.UTF-8
# en_US en_US.ISO8859-1 en_US.ISO8859-15 en_US.US-ASCII
# en_US.UTF-8 es_ES es_ES.ISO8859-1 es_ES.ISO8859-15
# es_ES.UTF-8 et_EE et_EE.ISO8859-15 et_EE.UTF-8 eu_ES
# eu_ES.ISO8859-1 eu_ES.ISO8859-15 eu_ES.UTF-8 fi_FI
# fi_FI.ISO8859-1 fi_FI.ISO8859-15 fi_FI.UTF-8 fr_BE
# fr_BE.ISO8859-1 fr_BE.ISO8859-15 fr_BE.UTF-8 fr_CA
# fr_CA.ISO8859-1 fr_CA.ISO8859-15 fr_CA.UTF-8 fr_CH
# fr_CH.ISO8859-1 fr_CH.ISO8859-15 fr_CH.UTF-8 fr_FR
# fr_FR.ISO8859-1 fr_FR.ISO8859-15 fr_FR.UTF-8 he_IL
# he_IL.UTF-8 hi_IN.ISCII-DEV hr_HR hr_HR.ISO8859-2 hr_HR.UTF-8
# hu_HU hu_HU.ISO8859-2 hu_HU.UTF-8 hy_AM hy_AM.ARMSCII-8
# hy_AM.UTF-8 is_IS is_IS.ISO8859-1 is_IS.ISO8859-15
# is_IS.UTF-8 it_CH it_CH.ISO8859-1 it_CH.ISO8859-15
# it_CH.UTF-8 it_IT it_IT.ISO8859-1 it_IT.ISO8859-15
# it_IT.UTF-8 ja_JP ja_JP.SJIS ja_JP.UTF-8 ja_JP.eucJP kk_KZ
# kk_KZ.PT154 kk_KZ.UTF-8 ko_KR ko_KR.CP949 ko_KR.UTF-8
# ko_KR.eucKR lt_LT lt_LT.ISO8859-13 lt_LT.ISO8859-4
# lt_LT.UTF-8 nl_BE nl_BE.ISO8859-1 nl_BE.ISO8859-15
# nl_BE.UTF-8 nl_NL nl_NL.ISO8859-1 nl_NL.ISO8859-15
# nl_NL.UTF-8 no_NO no_NO.ISO8859-1 no_NO.ISO8859-15
# no_NO.UTF-8 pl_PL pl_PL.ISO8859-2 pl_PL.UTF-8 pt_BR
# pt_BR.ISO8859-1 pt_BR.UTF-8 pt_PT pt_PT.ISO8859-1 pt_PT.ISO8859-15
# pt_PT.UTF-8 ro_RO ro_RO.ISO8859-2 ro_RO.UTF-8 ru_RU
# ru_RU.CP1251 ru_RU.CP866 ru_RU.ISO8859-5 ru_RU.KOI8-R
# ru_RU.UTF-8 sk_SK sk_SK.ISO8859-2 sk_SK.UTF-8 sl_SI
# sl_SI.ISO8859-2 sl_SI.UTF-8 sr_YU sr_YU.ISO8859-2 sr_YU.ISO8859-5
# sr_YU.UTF-8 sv_SE sv_SE.ISO8859-1 sv_SE.ISO8859-15
# sv_SE.UTF-8 tr_TR tr_TR.ISO8859-9 tr_TR.UTF-8 uk_UA
# uk_UA.ISO8859-5 uk_UA.KOI8-U uk_UA.UTF-8 zh_CN zh_CN.GB18030
# zh_CN.GB2312 zh_CN.GBK zh_CN.UTF-8 zh_CN.eucCN zh_HK
# zh_HK.Big5HKSCS zh_HK.UTF-8 zh_TW zh_TW.Big5 zh_TW.UTF-8
#
# tested okay.
#
# None of your locales were broken.
../lib/locale.t ...................................................
Failed 1/117 subtests
So none were "broken", but one "failed". And that, it seems, prevents the installation from succeeding, even by force.

The fault comes from test 99 of the "be_BY.CP1131" locale.
The ultimate fix needs to come from either the Perl developers or Apple.
In the mean time, you can get the install to work by moving /usr/share/locale/be_BY.CP1131 to some other directory. Perl will no longer test this locale. This isn't an ideal solution, but it will get you perlbrew perl assuming you don't need this specific locale.

Related

Pre-commit Pylint "exit code: 32" upon committing, no issues on `run --all-files`

When I run pre-commit run --all-files all goes well, when I try to commit, pylint throws an error with: Exit code: 32, followed by the list of usage options. The only files changed are .py files:
git status
On branch include-gitlab-arg
Your branch is up to date with 'origin/include-gitlab-arg'.
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
renamed: code/project1/src/Main.py -> code/project1/src/GitLab/GitLab_runner_token_getter.py
renamed: code/project1/src/get_gitlab_runner_token.py -> code/project1/src/GitLab/get_gitlab_runner_token.py
modified: code/project1/src/__main__.py
modified: code/project1/src/control_website.py
deleted: code/project1/src/get_website_controller.py
modified: code/project1/src/helper.py
Error Output:
The git commit -m "some change." command yields the following pre-commit error:
pylint...................................................................Failed
- hook id: pylint
- exit code: 32
usage: pylint [options]
optional arguments:
-h, --help
show this
help
message and
exit
Commands:
Options which are actually commands. Options in this group are mutually exclusive.
--rcfile RCFILE
whereas pre-commit run --all-files passes.
And the .pre-commit-config.yaml contains:
# This file specifies which checks are performed by the pre-commit service.
# The pre-commit service prevents people from pushing code to git that is not
# up to standards. # The reason mirrors are used instead of the actual
# repositories for e.g. black and flake8, is because those repositories also
# need to contain a pre-commit hook file, which they often don't by default.
# So to resolve that, a mirror is created that includes such a file.
default_language_version:
python: python3.8. # or python3
repos:
# Test if the python code is formatted according to the Black standard.
- repo: https://github.com/Quantco/pre-commit-mirrors-black
rev: 22.6.0
hooks:
- id: black-conda
args:
- --safe
- --target-version=py36
# Test if the python code is formatted according to the flake8 standard.
- repo: https://github.com/Quantco/pre-commit-mirrors-flake8
rev: 5.0.4
hooks:
- id: flake8-conda
args: ["--ignore=E501,W503,W504,E722,E203"]
# Test if the import statements are sorted correctly.
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
args: ["--profile", "black", --line-length=79]
## Test if the variable typing is correct. (Variable typing is when you say:
## def is_larger(nr: int) -> bool: instead of def is_larger(nr). It makes
## it explicit what type of input and output a function has.
## - repo: https://github.com/python/mypy
# - repo: https://github.com/pre-commit/mirrors-mypy
#### - repo: https://github.com/a-t-0/mypy
# rev: v0.982
# hooks:
# - id: mypy
## Tests if there are spelling errors in the code.
# - repo: https://github.com/codespell-project/codespell
# rev: v2.2.1
# hooks:
# - id: codespell
# Performs static code analysis to check for programming errors.
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
args:
[
"-rn", # Only display messages
"-sn", # Don't display the score
"--ignore-long-lines", # Ignores long lines.
]
# Runs additional tests that are created by the pre-commit software itself.
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
# Check user did not add large files.
- id: check-added-large-files
# Check if `.py` files are written in valid Python syntax.
- id: check-ast
# Require literal syntax when initializing empty or zero Python builtin types.
- id: check-builtin-literals
# Checks if there are filenames that would conflict if case is changed.
- id: check-case-conflict
# Checks if the Python functions have docstrings.
- id: check-docstring-first
# Checks if any `.sh` files have a shebang like #!/bin/bash
- id: check-executables-have-shebangs
# Verifies json format of any `.json` files in repo.
- id: check-json
# Checks if there are any existing merge conflicts caused by the commit.
- id: check-merge-conflict
# Checks for symlinks which do not point to anything.
- id: check-symlinks
# Checks if xml files are formatted correctly.
- id: check-xml
# Checks if .yml files are valid.
- id: check-yaml
# Checks if debugger imports are performed.
- id: debug-statements
# Detects symlinks changed to regular files with content path symlink was pointing to.
- id: destroyed-symlinks
# Checks if you don't accidentally push a private key.
- id: detect-private-key
# Replaces double quoted strings with single quoted strings.
# This is not compatible with Python Black.
#- id: double-quote-string-fixer
# Makes sure files end in a newline and only a newline.
- id: end-of-file-fixer
# Removes UTF-8 byte order marker.
- id: fix-byte-order-marker
# Add <# -*- coding: utf-8 -*-> to the top of python files.
#- id: fix-encoding-pragma
# Checks if there are different line endings, like \n and crlf.
- id: mixed-line-ending
# Asserts `.py` files in folder `/test/` (by default:) end in `_test.py`.
- id: name-tests-test
# Override default to check if `.py` files in `/test/` START with `test_`.
args: ['--django']
# Ensures JSON files are properly formatted.
- id: pretty-format-json
args: ['--autofix']
# Sorts entries in requirements.txt and removes incorrect pkg-resources entries.
- id: requirements-txt-fixer
# Sorts simple YAML files which consist only of top-level keys.
- id: sort-simple-yaml
# Removes trailing whitespaces at end of lines of .. files.
- id: trailing-whitespace
- repo: https://github.com/PyCQA/autoflake
rev: v1.7.0
hooks:
- id: autoflake
args: ["--in-place", "--remove-unused-variables", "--remove-all-unused-imports", "--recursive"]
name: AutoFlake
description: "Format with AutoFlake"
stages: [commit]
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
hooks:
- id: bandit
name: Bandit
stages: [commit]
# Enforces formatting style in Markdown (.md) files.
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.16
hooks:
- id: mdformat
additional_dependencies:
- mdformat-toc
- mdformat-gfm
- mdformat-black
- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.1
hooks:
- id: absolufy-imports
files: '^src/.+\.py$'
args: ['--never', '--application-directories', 'src']
- repo: https://github.com/myint/docformatter
rev: v1.5.0
hooks:
- id: docformatter
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
hooks:
- id: python-use-type-annotations
- id: python-check-blanket-noqa
- id: python-check-blanket-type-ignore
# Updates the syntax of `.py` files to the specified python version.
# It is not compatible with: pre-commit hook: fix-encoding-pragma
- repo: https://github.com/asottile/pyupgrade
rev: v3.0.0
hooks:
- id: pyupgrade
args: [--py38-plus]
- repo: https://github.com/markdownlint/markdownlint
rev: v0.11.0
hooks:
- id: markdownlint
With pyproject.toml:
# This is used to configure the black, isort and mypy such that the packages don't conflict.
# This file is read by the pre-commit program.
[tool.black]
line-length = 79
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.mypy_cache
| build
| dist
)/
'''
[tool.coverage.run]
# Due to a strange bug with xml output of coverage.py not writing the full-path
# of the sources, the full root directory is presented as a source alongside
# the main package. As a result any importable Python file/package needs to be
# included in the omit
source = [
"foo",
".",
]
# Excludes the following directories from the coverage report
omit = [
"tests/*",
"setup.py",
]
[tool.isort]
profile = "black"
[tool.mypy]
ignore_missing_imports = true
[tool.pylint.basic]
bad-names=[]
[tool.pylint.messages_control]
# Example: Disable error on needing a module-level docstring
disable=[
"import-error",
"invalid-name",
"fixme",
]
[tool.pytest.ini_options]
# Runs coverage.py through use of the pytest-cov plugin
# An xml report is generated and results are output to the terminal
# TODO: Disable this line to disable CLI coverage reports when running tests.
#addopts = "--cov --cov-report xml:cov.xml --cov-report term"
# Sets the minimum allowed pytest version
minversion = 5.0
# Sets the path where test files are located (Speeds up Test Discovery)
testpaths = ["tests"]
And setup.py:
"""This file is to allow this repository to be published as a pip module, such
that people can install it with: `pip install networkx-to-lava-nc`.
You can ignore it.
"""
import setuptools
with open("README.md", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="networkx-to-lava-nc-snn",
version="0.0.1",
author="a-t-0",
author_email="author#example.com",
description="Converts networkx graphs representing spiking neural networks"
+ " (SNN)s of LIF neruons, into runnable Lava SNNs.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/a-t-0/networkx-to-lava-nc",
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: AGPL3",
"Operating System :: OS Independent",
],
)
Question
How can I resolve the pylint usage error to ensure the commit passes pre-commit?
The issue was caused by #"--ignore-long-lines", # Ignores long lines. in the .pre-commit-config.yaml. I assume it conflicts with the line length settings for black, and for the pyproject.toml, which are set to 79 respectively.

Ansible/python error: No module named ansible.errors

I have installed Ansible using "pip" as a root user on RHEL
python version - Python 2.7.5
Ansible version -
ansible 2.7.4
config file = None
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /bin/ansible
python version = 2.7.5 (default, May 31 2018, 09:41:32) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
whenever I try to use ansible as a different user getting an error
Error:
$ ansible --version
Traceback (most recent call last):
File "/usr/bin/ansible", line 40, in <module>
from ansible.errors import AnsibleError, AnsibleOptionsError, AnsibleParserError
ImportError: No module named ansible.errors
I find two ansible files located in different places, Is this abnormal?
one at /bin/ansible & other at /usr/bin/ansible
$ cd /bin
$ ls -lart ansible
-rwxr-xr-x 1 root root 5837 Dec 9 13:12 ansible
$ cd ansible
-ksh: cd: ansible: [Not a directory]
$ ls -lart /usr/bin/ansible
-rwxr-xr-x 1 root root 5837 Dec 9 13:12 /usr/bin/ansible
Content of /bin/ansible
$ cat /bin/ansible
#!/bin/python
# (c) 2012, Michael DeHaan <michael.dehaan#gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
########################################################
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
__requires__ = ['ansible']
try:
import pkg_resources
except Exception:
# Use pkg_resources to find the correct versions of libraries and set
# sys.path appropriately when there are multiversion installs. But we
# have code that better expresses the errors in the places where the code
# is actually used (the deps are optional for many code paths) so we don't
# want to fail here.
pass
import os
import shutil
import sys
import traceback
from ansible.errors import AnsibleError, AnsibleOptionsError, AnsibleParserError
from ansible.module_utils._text import to_text
# Used for determining if the system is running a new enough python version
# and should only restrict on our documented minimum versions
_PY3_MIN = sys.version_info[:2] >= (3, 5)
_PY2_MIN = (2, 6) <= sys.version_info[:2] < (3,)
_PY_MIN = _PY3_MIN or _PY2_MIN
if not _PY_MIN:
raise SystemExit('ERROR: Ansible requires a minimum of Python2 version 2.6 or Python3 version 3.5. Current version: %s' % ''.join(sys.version.splitlines()))
class LastResort(object):
# OUTPUT OF LAST RESORT
def display(self, msg, log_only=None):
print(msg, file=sys.stderr)
def error(self, msg, wrap_text=None):
print(msg, file=sys.stderr)
if __name__ == '__main__':
display = LastResort()
try: # bad ANSIBLE_CONFIG or config options can force ugly stacktrace
import ansible.constants as C
from ansible.utils.display import Display
except AnsibleOptionsError as e:
display.error(to_text(e), wrap_text=False)
sys.exit(5)
cli = None
me = os.path.basename(sys.argv[0])
try:
display = Display()
display.debug("starting run")
sub = None
target = me.split('-')
if target[-1][0].isdigit():
# Remove any version or python version info as downstreams
# sometimes add that
target = target[:-1]
if len(target) > 1:
sub = target[1]
myclass = "%sCLI" % sub.capitalize()
elif target[0] == 'ansible':
sub = 'adhoc'
myclass = 'AdHocCLI'
else:
raise AnsibleError("Unknown Ansible alias: %s" % me)
try:
mycli = getattr(__import__("ansible.cli.%s" % sub, fromlist=[myclass]), myclass)
except ImportError as e:
# ImportError members have changed in py3
if 'msg' in dir(e):
msg = e.msg
else:
msg = e.message
if msg.endswith(' %s' % sub):
raise AnsibleError("Ansible sub-program not implemented: %s" % me)
else:
raise
try:
args = [to_text(a, errors='surrogate_or_strict') for a in sys.argv]
except UnicodeError:
display.error('Command line args are not in utf-8, unable to continue. Ansible currently only understands utf-8')
display.display(u"The full traceback was:\n\n%s" % to_text(traceback.format_exc()))
exit_code = 6
else:
cli = mycli(args)
cli.parse()
exit_code = cli.run()
except AnsibleOptionsError as e:
cli.parser.print_help()
display.error(to_text(e), wrap_text=False)
exit_code = 5
except AnsibleParserError as e:
display.error(to_text(e), wrap_text=False)
exit_code = 4
# TQM takes care of these, but leaving comment to reserve the exit codes
# except AnsibleHostUnreachable as e:
# display.error(str(e))
# exit_code = 3
# except AnsibleHostFailed as e:
# display.error(str(e))
# exit_code = 2
except AnsibleError as e:
display.error(to_text(e), wrap_text=False)
exit_code = 1
except KeyboardInterrupt:
display.error("User interrupted execution")
exit_code = 99
except Exception as e:
if C.DEFAULT_DEBUG:
# Show raw stacktraces in debug mode, It also allow pdb to
# enter post mortem mode.
raise
have_cli_options = cli is not None and cli.options is not None
display.error("Unexpected Exception, this is probably a bug: %s" % to_text(e), wrap_text=False)
if not have_cli_options or have_cli_options and cli.options.verbosity > 2:
log_only = False
if hasattr(e, 'orig_exc'):
display.vvv('\nexception type: %s' % to_text(type(e.orig_exc)))
why = to_text(e.orig_exc)
if to_text(e) != why:
display.vvv('\noriginal msg: %s' % why)
else:
display.display("to see the full traceback, use -vvv")
log_only = True
display.display(u"the full traceback was:\n\n%s" % to_text(traceback.format_exc()), log_only=log_only)
exit_code = 250
finally:
# Remove ansible tmpdir
shutil.rmtree(C.DEFAULT_LOCAL_TMP, True)
sys.exit(exit_code)
list:
$ ls -lart /usr/lib/python2.7/site-packages/ansible/errors/
total 36
-rw------- 1 root root 3820 Dec 9 13:12 yaml_strings.py
-rw------- 1 root root 11555 Dec 9 13:12 __init__.py
-rw------- 1 root root 3147 Dec 9 13:12 yaml_strings.pyc
-rw------- 1 root root 11535 Dec 9 13:12 __init__.pyc
drwx------ 2 root root 88 Dec 9 13:12 .
drwx------ 17 root root 4096 Dec 9 13:12 ..
can anyone help me in solving it.
In my case I was working in a venv in python and that caused Ansible to not find all it's python modules. Might not necessarily be the OP's issue here but it's worth being aware of.
It's because the installation did not make the files in /usr/lib/python2.7/site-packages/ansible readable by groups or world, meaning that only the file's owner (root in this case) can read them:
$ ls -lart /usr/lib/python2.7/site-packages/ansible/errors/
total 36
-rw------- 1 root root 11555 Dec 9 13:12 __init__.py
# ^^^^^^ should be -rw-r--r-- for files
You can change this one specific problem with chmod but likely in the future you will want to run umask go-w first in order to keep pip from defaulting to 0600 permissions for files that it writes out
# chmod -R a+rX /usr/lib/python2.7/site-packages/ansible
The X in that expression is to set the eXecute bit but only for files that already have execute in the user's permissions (so, for directories and executable files, but not for "normal" files; you can read the full story in man 1 chmod)
In my case the problem turned out to be following:
i was executing the command using sudo, which was picking different .ssh/id_rsa.pub compared to what I had posted public key in the ssh-server. This was rightly resulting into permission denied.
This was discovered only by doing (taken from the dump that comes from ansible ping command using -vvv. Note that I have added -v command to ssh, that gives you the hint on what has failed during the login process.
sudo sshpass -d11 ssh -v -C -o ControlMaster=auto -o ControlPersist=60s -o 'User="ubuntu"' -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/66b206be85 10.115.216.134 '/bin/sh -c '"'"'echo ~ubuntu && sleep 0'"'"''
In my case, I was using a broken venv. Deactivated it, removed it and reinstalled every thing:
deactivate
rm -rf .venv
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt

Debian - InitScript - "Do NOT set -e" in /etc/init.d/skeleton

I was wondering why "Do NOT set -e" was present in /etc/init.d/skeleton as I thought it was always good practice.
#! /bin/sh
### BEGIN INIT INFO
# Provides: skeleton
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
### END INIT INFO
# Author: Foo Bar <foobar#baz.org>
#
# Please remove the "Author" lines above and replace them
# with your own name if you copy and modify this script.
# Do NOT "set -e"
Debian wiki recommends it (https://wiki.debian.org/LSBInitScripts/StatusSupport) so I don't know what I should do.

PhantomJs crashing when testing Jasmine from the command line

I'm running Jasmine js tests on a project. I'm using the jasmine ruby gem to run my tests. I had everything working with some sample tests earlier but when I updated the jasmine.yml file with some new tests my tests no longer run.
When I try to run from the command line with rake jasmine:ci I get a segmentation fault in PhantomJs.
My jasmine.yml file looks like this:
# src_files
#
# Return an array of filepaths relative to src_dir to include before jasmine specs.
# Default: []
#
# EXAMPLE:
#
# src_files:
# - lib/source1.js
# - lib/source2.js
# - dist/**/*.js
#
src_files:
- app/javascripts/beatView.js
# stylesheets
#
# Return an array of stylesheet filepaths relative to src_dir to include before jasmine specs.
# Default: []
#
# EXAMPLE:
#
# stylesheets:
# - css/style.css
# - stylesheets/*.css
#
stylesheets:
- assets/application.css
# helpers
#
# Return an array of filepaths relative to spec_dir to include before jasmine specs.
# Default: ["helpers/**/*.js"]
#
# EXAMPLE:
#
# helpers:
# - helpers/**/*.js
#
helpers:
- 'helpers/**/*.js'
# spec_files
#
# Return an array of filepaths relative to spec_dir to include.
# Default: ["**/*[sS]pec.js"]
#
# EXAMPLE:
#
# spec_files:
# - **/*[sS]pec.js
#
spec_files:
- 'spec/javascripts//backbone/views/beat_spec.js'
# src_dir
#
# Source directory path. Your src_files must be returned relative to this path. Will use root if left blank.
# Default: project root
#
# EXAMPLE:
#
# src_dir: public
#
src_dir:
# spec_dir
#
# Spec directory path. Your spec_files must be returned relative to this path.
# Default: spec/javascripts
#
# EXAMPLE:
#
# spec_dir: spec/javascripts
#
spec_dir: spec/javascripts
# spec_helper
#
# Ruby file that Jasmine server will require before starting.
# Returned relative to your root path
# Default spec/javascripts/support/jasmine_helper.rb
#
# EXAMPLE:
#
# spec_helper: spec/javascripts/support/jasmine_helper.rb
#
spec_helper: spec/javascripts/support/jasmine_helper.rb
# boot_dir
#
# Boot directory path. Your boot_files must be returned relative to this path.
# Default: Built in boot file
#
# EXAMPLE:
#
# boot_dir: spec/javascripts/support/boot
#
boot_dir:
# boot_files
#
# Return an array of filepaths relative to boot_dir to include in order to boot Jasmine
# Default: Built in boot file
#
# EXAMPLE
#
# boot_files:
# - '**/*.js'
#
boot_files:
# rack_options
#
# Extra options to be passed to the rack server
# by default, Port and AccessLog are passed.
#
# This is an advanced options, and left empty by default
#
# EXAMPLE
#
# rack_options:
# server: 'thin'
I don't know if the issue is in the yml file or if there is something else that I may have messed up.
I figured this one out. The issue was in my jasmine.yml file. The path for the specs was spec/javascripts/ as you can see where it specified spec_dir and then I was giving the spec file as - 'spec/javascripts//backbone/views/beat_spec.js' which caused phantom to crash because of the repeated directory names.

homebrew brew doctor fail message

I am going through my home brew doctor messages and no matter what I do I can not seem to remove this message:
Warning: You have uncommitted modifications to Homebrew's core.
Unless you know what you are doing, you should run:
cd /usr/local && git reset --hard
Does anyone have any idea on how to get rid of this?
From git status /usr/local
# Library/Aliases/dwarffortress
# Library/Aliases/ultima4
# Library/Aliases/ultima7
# Library/Contributions/examples/
# Library/Formula/abfind.rb
# Library/Formula/abuse.rb
# Library/Formula/akonadi.rb
# Library/Formula/angband.rb
# Library/Formula/apc.rb
# Library/Formula/aqua-less.rb
# Library/Formula/argp-standalone.rb
# Library/Formula/attica.rb
# Library/Formula/bashreduce.rb
# Library/Formula/c10t.rb
# Library/Formula/chocolate-doom.rb
# Library/Formula/cmigemo.rb
# Library/Formula/coffee-script.rb
# Library/Formula/csstidy.rb
# Library/Formula/dosbox.rb
# Library/Formula/dotless.rb
# Library/Formula/dwarf-fortress.rb
# Library/Formula/exult.rb
# Library/Formula/flip.rb
# Library/Formula/frobtads.rb
# Library/Formula/frotz.rb
# Library/Formula/gearman-php.rb
# Library/Formula/gnu-chess.rb
# Library/Formula/gnu-go.rb
# Library/Formula/growlme.rb
# Library/Formula/imagick.rb
# Library/Formula/inform6.rb
# Library/Formula/jnethack.rb
# Library/Formula/jwhois.rb
# Library/Formula/kde-phonon.rb
# Library/Formula/kdebase-runtime.rb
# Library/Formula/kdelibs.rb
# Library/Formula/kdepimlibs.rb
# Library/Formula/libgdiplus.rb
# Library/Formula/libiconv.rb
# Library/Formula/libsgml.rb
# Library/Formula/maatkit.rb
# Library/Formula/mcrypt-php.rb
# Library/Formula/mednafen.rb
# Library/Formula/memcache-php.rb
# Library/Formula/memcached-php.rb
# Library/Formula/memcachedb.rb
# Library/Formula/midgard2-php.rb
# Library/Formula/mongo-php.rb
# Library/Formula/n2n.rb
# Library/Formula/nazghul.rb
# Library/Formula/nethack.rb
# Library/Formula/netris.rb
# Library/Formula/ninja.rb
# Library/Formula/open-tyrian.rb
# Library/Formula/orderly.rb
# Library/Formula/oxygen-icons.rb
# Library/Formula/parsley.rb
# Library/Formula/pbrt.rb
# Library/Formula/pcntl-php.rb
# Library/Formula/phpmyadmin.rb
# Library/Formula/pioneers.rb
# Library/Formula/platypus.rb
# Library/Formula/pspell-php.rb
# Library/Formula/qimageblitz.rb
# Library/Formula/robotfindskitten.rb
# Library/Formula/shared-desktop-ontologies.rb
# Library/Formula/shen.rb
# Library/Formula/slashem.rb
# Library/Formula/solr-php.rb
# Library/Formula/soprano.rb
# Library/Formula/sparse.rb
# Library/Formula/spim.rb
# Library/Formula/stone-soup.rb
# Library/Formula/strigi.rb
# Library/Formula/uggconv.rb
# Library/Formula/unnethack.rb
# Library/Formula/voldemort.rb
# Library/Formula/woof.rb
# Library/Formula/xboard.rb
# Library/Formula/xcache.rb
# Library/Formula/xdebug.rb
# Library/Formula/xmoto.rb
# Library/Formula/xu4.rb
# Library/Homebrew/test/tests
After posting on the homebrew issues log https://github.com/mxcl/homebrew/issues/11761 I was able to clear the error by running git clean -df and once that is finished brew doctor. Once complete you should see:
Your system is raring to brew.

Resources