Jenv: no such command `enable-plugin'

Created on 10 Feb 2016  ·  6Comments  ·  Source: jenv/jenv

jenv doesnt allow me to set the enable the plugins. I'm getting the following error:

$ jenv enable-plugin sbt
jenv: no such command `enable-plugin'

although it is listed as a valid command in the list of available commands

$ jenv commands
...
disable-plugin
...
enable-plugin
...

Most helpful comment

Indeed, I've never tested in a tools like ansible.

To work in a interactive shell, you have to add :

eval "$(jenv init -)"
in you .bashrc / .zshrc

Maybe, this line is never executed in a ansible scope.

All 6 comments

You may want to specify your version and your machine OS.

Same issue. OSX 10.11.4

Same issue. Ubuntu 16.04, jenv 0.4.3-14-g15104a3

I have the same issue on mac os x when running an ansible script.
It does not happen when running manually from the terminal.

jenv doctor says:

[OK]    No JAVA_HOME set
[OK]    Java binaries in path are jenv shims
[OK]    Jenv is correctly loaded

jenv commands list 'enable-plugin' and 'disable-plugin'

Indeed, I've never tested in a tools like ansible.

To work in a interactive shell, you have to add :

eval "$(jenv init -)"
in you .bashrc / .zshrc

Maybe, this line is never executed in a ansible scope.

You are right!

This task will now work:

- name: enable jenv plugins
  shell: eval "$(jenv init -)" && jenv enable-plugin {{ item }}
  with_items: "{{ jenv_plugins }}"

Many thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

paul-hammant picture paul-hammant  ·  7Comments

calebmeyer picture calebmeyer  ·  9Comments

c0nscience picture c0nscience  ·  3Comments

ikuwow picture ikuwow  ·  4Comments

hanxue picture hanxue  ·  3Comments