The most likelyOne common cause of this type of error is that your script depends upon executing in a specific directory, and the launcher doesn't start the script in that directory.
Another cause could be differences in the shell environment. Most likely your PATH variable and/or your current working directory is different and affecting your script.
You can check both with one procedure.
To check the difference in the environment and working directories do this:
Start gvim
gvimfrom the terminal and in that gvimgvim, enter::!env > /tmp/env.terminalStart gvim
gvimfrom the launcher and in that gvimgvimenter::!env > /tmp/env.launcherIn a Terminal window, at the shell prompt, enter
diff /tmp/env.terminal /tmp/env.launcher
If the problem is different working directories, youThis diff command will see differencesshow the difference in the valueenvironments of the PWD environment variableboth gvim instances.
You will also see any otherLook at the differences in environment variables, for example if a variable is different or non-existent in one of the environments. Be sure to check the values of both the PATH and PWD variables.