Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not load execjs #234

Open
erayalakese opened this issue Feb 2, 2016 · 1 comment
Open

Could not load execjs #234

erayalakese opened this issue Feb 2, 2016 · 1 comment

Comments

@erayalakese
Copy link

$ git --version
git version 2.3.8 (Apple Git-58)

$ sudo gem install pre-commit
Password:
Fetching: pluginator-1.3.0.gem (100%)
Successfully installed pluginator-1.3.0
Fetching: pre-commit-0.26.0.gem (100%)
Successfully installed pre-commit-0.26.0
Parsing documentation for pluginator-1.3.0
Installing ri documentation for pluginator-1.3.0
Parsing documentation for pre-commit-0.26.0
Installing ri documentation for pre-commit-0.26.0
2 gems installed

$ git init
Initialized empty Git repository in /Users/erayalakese/Desktop/COP/precommittest/.git/

$ pre-commit install
Installed /Library/Ruby/Gems/2.0.0/gems/pre-commit-0.26.0/templates/hooks/default to .git/hooks/pre-commit

$ touch asd

$ git add asd

$ git commit -m 'sss'
Could not load execjs: cannot load such file -- execjs
[master (root-commit) 6129c1b] sss
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 asd


$ nano eray.php  <<< php file with bad syntax

$ git add eray.php 

$ git commit -m 'xzczxvzxcv'
Could not load execjs: cannot load such file -- execjs
[master 0430969] xzczxvzxcv
 1 file changed, 3 insertions(+)
 create mode 100644 eray.php
@jish
Copy link
Owner

jish commented Feb 3, 2016

That is likely coming from one of the JavaScript checks. If you're doing solely PHP development you can disable the Rails checks:

$ pre-commit disable git checks rails

Or if you do want the JavaScript checks to run, try installing the execjs gem

$ gem install execjs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants