1
votes

I have compile chez scheme and installed sublime3 SublimeREPL and scheme in OSX system.

and config as How to configure SublimeREPL for mit-scheme? topic.

edit SublimeText3 >> InstalledPackages >> Scheme.sublime-package (open with Zip software) >> Scheme.sublime-build (modify to the following below)

{
    "cmd": ["scm", "-f", "$file"],
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
    "selector": "source.scheme"
}

I can open chez scheme interpreter in sublimeREPL,but when I want to build file with "Build System: scheme", I got error"[Errno 2] No such file or directory: 'scheme'", how should I modified Build System code?

Terminal scheme path testerror message

2

2 Answers

0
votes

The error "[Errno 2] No such file or directory: 'scheme'" means that the system looked for a command scheme in your search path (i.e. in the list of folders in which your commands are stored).

First you must check that you have installed Chez Scheme correctly

  • open a terminal
  • write: scheme

Do you see something like this:

soegaard$ scheme
Chez Scheme Version 9.4
Copyright 1984-2016 Cisco Systems, Inc.

> (exit)

Then type

which scheme

to see the path to the scheme executable. In my case (also on OS X) the path is /usr/local/bin/scheme.

Next up is to check your search path. In a terminal, type:

env| grep PATH

The output is something like this:

PATH=/opt/local/bin:/opt/local/sbin:/usr/local/bin:/...

It is a list of folder separated by colons. Check that the folder in which the scheme executable is on the list. If it isn't either make a copy of scheme in one of the folder or add your folder to the path.

If you decide to alter the path you may or may not have to restart Sublime.

0
votes

Thank a lot @soegaard. The easy way to set the path problem is use Package Control and search for "Fix Mac Path".

and also edit SublimeText3 >> InstalledPackages >> Scheme.sublime-package (open with Zip software) >> Scheme.sublime-build (modify to the following below)

{
    "cmd": ["scheme", "$file"],
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
    "selector": "source.scheme"
}

The correct build