Sublimetext3 Building with Lua (windows) - lua

I'm having difficulty building using lua in sublimetext3, this is how set up my system: using a sublimetext3 lua environment and build system on a *.lua file. I keep receiving this error:
[WinError 2] The system cannot find the file specified
[cmd: ['lua', 'C:\\Users\\Joe\\Documents\\SublimeText3\\LuaWorkspace\\helloworld.lua']]
[dir: C:\Users\Joe\Documents\SublimeText3\LuaWorkspace]
[path: C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Users\Joe\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\mingw-w64\i686-7.3.0-posix-dwarf-rt_v5-rev0\mingw32\bin;C:\Program Files\Git\cmd;C:\Program Files\LOVE;C:\Progra~1\Lua\5.3.4_64;C:\Users\Joe\AppData\Local\Microsoft\WindowsApps;]
[Finished]
and this is what my lua.sublime_build file looks like:
{
"cmd": ["lua", "$file"],
"file_regex": "^(?:lua:)?[\t ](...*?):([0-9]*):?([0-9]*)",
"selector": "source.lua"
}
I can get this to work fine using a cmd prompt with lua *.lua however it would be nice to do it straight from sublime.

I've solved the issue after some digging and researching... the problem was how lua was being found; my fix was to place a .bat file within the path folder that helps find the lua53 command:
Innards of the .bat file:
#"%~dp0lua53.exe" %*
Changes to the lua.sublime_build file:
"cmd": ["lua.bat", "$file"]
all other lines can remain the same.

Related

The system cannot find the file specified error Lua

I have a folder containing main.lua opened in Sublime Text, but when I try to compile it in the text editor, it gives me this error. I have no problem running the code in the game engine. Can someone tell me what I am doing wrong and how to fix it in layman's terms? I am new to coding. Here is the full error:
[WinError 2] The system cannot find the file specified
[cmd: ['lua', 'C:\\Users\\eshig\\Desktop\\pong-0\\main.lua']]
[dir: C:\Users\eshig\Desktop\pong-0]
[path: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%SYSTEMROOT%\System32\OpenSSH\;C:\Program Files\Java\jdk-13.0.2\bin;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;]
[Finished]

No file or directory exists: Path Varaible Setting

I run a program which gives me error ./main: error while loading shared libraries: libwx_gtk2u_core-3.1.so.3: cannot open shared object file: No such file or directory
I have a libwx_gtk2u_core-2.8.so file to which I am setting the path in ~./bashrc file by adding the following two lines `
> $LD_LIBRARY_PATH:"/home/saad/PathFiles"
> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
When I open the terminal again I get the error bash: :/home/saad/PathFiles: No such file or directory even though libwx_gtk2u_core-2.8.so is present in the PathFiles folder. Even after doing sudo ldconfig I get the No such file or directory error.
Your first line uses wrong syntax. If your libwx_*.so files are actually in /home/saad/PathFiles, you should just do
export LD_LIBRARY_PATH=/home/saad/PathFiles
or, if you have an existing LD_LIBRARY_PATH value
export LD_LIBRARY_PATH=/home/saad/PathFiles:$LD_LIBRARY_PATH
You can also use ldd ./main to check whether all the dependencies are found.

sublime text ruby test windows cannot find path

I am running Windows 7 and have installed the sublime text ruby test. I can run rspec spec/
fine from the command line, however when I try it from sublime text i get the following error:
I check the PATH variable and its the same in my command line.
--
The system cannot find the path specified.
[Finished in 0.1s with exit code 1]
[cmd: ['bundle exec rspec spec\\models\\user_spec.rb']]
[dir: C:\Users\User1\Sites\sample_app]
[path: C:\Program Files (x86)\VMware\VMware vSphere CLI\Perl\site\bin;C:\Program Files (x86)\VMware\VMware vSphere CLI\Perl\bin;C:\Program Files\Common Files\Microsoft Shared\Microsoft Online Services;C:\Program Files (x86)\Common Files\Microsoft Shared\Microsoft Online Services;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Heroku\bin;C:\Program Files (x86)\git\cmd;C:\RailsInstaller\Git\cmd;C:\RailsInstaller\Ruby2.0.0\bin]
On Windows, instead of
"cmd": ["cake", "sbuild"]
it should be
"cmd": ["cake.cmd", "sbuild"]
Instead of modifying it just add:
"windows":
{
"cmd": ["cake.cmd", "sbuild"]
}
My guess is that you are using Sublime Text 3. I had the same problem and solved it as follows.
The cmd is passed as an array, while it should be a string. Maybe this worked in Sublime Text 2, but not in Sublime Text 3.
A solution that fixes the problem for me (Win 7, Sublime Text 3) is editing the code in run_ruby_test.py in the RubyTest folder.
Line 202: change this:
"cmd": [command],
to
"cmd": command,
Hope it helps!

Not a valid Windows application error in PHPStorm file watcher

Here's what I get in my CMD:
C:\Documents and Settings\Administrator>lessc
lessc: no input files
... (long program output)
C:\Documents and Settings\Administrator>"C:\Documents and Settings\Administrator
\Dane aplikacji\npm\lessc"
lessc: no input files
usage: lessc [option option=parameter ...] <source> [destination]
... (long program output)
C:\Documents and Settings\Administrator>
But when I add a file watcher in my PHPStorm for LESS and specify the program to:
C:\Documents and Settings\Administrator\Dane aplikacji\npm\lessc, I get the following error:
16:52:38 An exception occurred while executing watcher 'LESS'. Watcher has been disabled. Fix it.: Cannot run program "C:\Documents and Settings\Administrator\Dane aplikacji\npm\lessc" (in directory "C:\Documents and Settings\Administrator\Pulpit\bootstrap\css"): CreateProcess error=193, %1 nie jest prawid³ow¹ aplikacj¹ systemu Wi
Why is this happening and how can I fix this?
You seems to forgot how Windows/DOS works ;)
When you trying to execute lessc in Command Shell, Windows will search for such file. If nothing found -- it will search for lessc.exe, lessc.com, lessc.bat, lessc.cmd and so on -- depends on value of PATHEXT environment variable. Just type SET in command prompt and see for yourself.
In PhpStorm (or any other software) where NO command shell is used but command executed DIRECTLY, you have to specify FULL program name, which is lessc.cmd

Sublime Text 2 - build can't find something on my path?

I have the following coffeescript build file:
{
"cmd": ["coffee", "-c", "$file"]
, "selector": "source.coffee"
}
which when I try to run it gives me:
[Error 2] The system cannot find the file specified [cmd: [u'coffee',u'-c', u'W:\mayapp\myscript.coffee']]
[dir: W:\myapp]
[path: /usr/local/bin:C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program
Files\Microsoft\Web Platform Installer\;C:\Program Files
(x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files
(x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program
Files\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files
(x86)\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files\Microsoft
SQL Server\110\DTS\Binn\;c:\Program Files (x86)\Microsoft SQL
Server\110\Tools\Binn\ManagementStudio\;c:\Program Files
(x86)\Microsoft Visual Studio
10.0\Common7\IDE\PrivateAssemblies\;c:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files\TortoiseHg\;C:\Program Files
(x86)\nodejs\;C:\Program Files\Mercurial\;C:\Program
Files\TortoiseSVN\bin;C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;C:\Program
Files (x86)\Bitvise SSH
Client;C:\Chocolatey\bin;C:\Users\George\AppData\Roaming\npm\;C:\Program
Files\Gallio\bin;C:\Program Files (x86)\Git\cmd;] [Finished]
In powershell
coffee -c w:\myapp\myscript.coffee
runs just fine leading me to think it's the coffee file from npm that the build system cannot find. Yet notice the npm directory IS on my path and coffee.cmd is absolutely in that directory
W:> get-command coffee | select path
Path
----
C:\Users\George\AppData\Roaming\npm\coffee.cmd
my best guess is that the error is due to that linux path prefixed to sublime's path variable but I have no idea where that is coming from it is not in my path variable outside of sublime.
The solution was to use the command name with extension - sublime was unable to infer it.
So:
{
"cmd": ["coffee.cmd", "-c", "$file"]
, "selector": "source.coffee"
}

Resources