VenGO icon indicating copy to clipboard operation
VenGO copied to clipboard

Command 'activate' doesn't looks like a valid VenGO command.

Open st0nx opened this issue 8 years ago • 13 comments

The manual you wrote, use command "vengo activate [name]" to activate enviriement, but is command not working. I run from ubuntu command line.

st0nx avatar Jul 07 '16 12:07 st0nx

It is vengo_activate it is a separate bash script.

DamnWidget avatar Jul 07 '16 12:07 DamnWidget

user@user-linux:~$ vengo mkenv -g go1.6.2 config_env
Checking installed Go versions... Pulling Go sources from Github... ✔
✔
Checking manifest integrity... ✔
Go config_env environment created using go1.6.2
user@user-linux:~$ vengo activate config_env
Command 'activate' doesn't looks like a valid VenGO command...
suggestion: execute 'vengo' with no arguments to get a list of valid commands
user@user-linux:~$ vengo_activate config_env
check_environment_exixtance: command not found

Maybe, I do something wrong.

st0nx avatar Jul 07 '16 13:07 st0nx

Can I know which SHELL do you use and how do you enable vengo in your system?

DamnWidget avatar Jul 07 '16 14:07 DamnWidget

I used standart linux ubuntu terminal.

st0nx avatar Jul 08 '16 07:07 st0nx

Ok, so I guess you are using BASH, try do this and give a try:

source ~/.VenGO/bin/includes/*

If it works put that line in your .bashrc file just below the source $HOME/.VenGO/bin/vengo line.

DamnWidget avatar Jul 08 '16 08:07 DamnWidget

Thank you! It works.

st0nx avatar Jul 08 '16 13:07 st0nx

$ vengo list
Pulling Go sources from Github... ✔
Installed
    go1.2.2 ✔

$ vengo mkenv -g go1.2.2 MyEnv
Checking installed Go versions... Pulling Go sources from Github... ✔
✔
Checking manifest integrity... ✔
Go MyEnv environment created using go1.2.2

$ vengo lsenvs
Virtual Go Environments
    MyEnv                 go1.2.2  ✔

$ source ~/.VenGO/bin/includes/*

$ vengo_activate MyEnv
VenGO: Environment 'MyEnv' doesn't exists.
  suggestion: try to create it with 'vengo create MyEnv -g <go_version>'

Still unable to activate the virtual env.

dixudx avatar Jul 13 '16 09:07 dixudx

What is the value of your $VENGO_HOME environment variable?

DamnWidget avatar Jul 13 '16 09:07 DamnWidget

$ echo $VENGO_HOME
/home/ubuntu/.VenGO

dixudx avatar Jul 13 '16 09:07 dixudx

Well, for some reason your SHELL is failing to find $VENGO_HOME/MyEnv (the function is implemented here), I will try to drop that SHELL session and start a new one.

DamnWidget avatar Jul 13 '16 09:07 DamnWidget

It is so weird that I can't find the folder $VENGO_HOME/MyEnv. However I can list the envs.

dixudx avatar Jul 13 '16 09:07 dixudx

VenGO works with the following paths on Linux:

  • ~/.VenGO
  • ~/.cache/VenGO

The only difference between the lsenvs and the vengo_activate commands is that the lsenvs is executed by Go (using os.Getenv) and vengo_activate is a shell script.

Is even weirder when you think about Go inheriting the environment data from the shell session that it is being executed on.

DamnWidget avatar Jul 13 '16 09:07 DamnWidget

After manually delete /home/ubuntu/.cache/VenGo, reinstall Go 1.2.2 and the corresponding env. I can successfully activate the virtual env.

dixudx avatar Jul 13 '16 09:07 dixudx