"ensime generate" is not a valid sbt command

I am trying to use sbt to create an ensime config file as described in this tutorial:

http://jawher.net/2011/01/17/scala-development-environment-emacs-sbt-ensime/

The problem I'm running into is that I can't get sbt to generate the config file as the "ensime generate" command is not part of the sbt command set.

[output]

[info] Building project ScalaTest 1.0 against Scala 2.9.2
[info]    using sbt.DefaultProject with sbt 0.7.7 and Scala 2.7.7
[error] No method named 'ensime' exists.
[info] Execute 'help' for a list of commands or 'actions' for a list of available project actions and methods.
[info] 
[info] Total time: 0 s, completed 26-Jan-2013 12:53:48
[info] 
[info] Total session time: 0 s, completed 26-Jan-2013 12:53:48
[error] Error during build.

      

[Steps followed]

cd <project directory> (sbt project root)
sbt 'ensime generate'

      

[Version Information]

sbt 0.7.7
ensime 2.9.2-0.9.8.1
scala 2.9.2

      

[emacs config]

(add-to-list 'load-path "~/.emacs.d/scala-emacs")
(require 'scala-mode-auto)
(add-hook 'scala-mode-hook
            '(lambda ()
        (scala-mode-feature-electric-mode)
           ))
(require 'scala-mode)
(add-to-list 'auto-mode-alist '("\\.scala$" . scala-mode))
(add-to-list 'load-path "~/.emacs.d/ensime/elisp/")
(require 'ensime)
(add-hook 'scala-mode-hook 'ensime-scala-mode-hook)

(push "/media/xxx/Development/Runtimes/scala-2.9.2/bin/" exec-path)
(push "/media/xxx/Development/Tools/sbt/" exec-path)

      

Any help is appreciated (I have checked all paths, so please no comment regarding this)

Greetings,

JLove

+3


source to share


3 answers


Have you added the ensime-sbt-cmd plugin to your sbt build? http://aemoncannon.github.com/ensime/index.html#tth_sEc3.1



+1


source


You seem to need to quote the command in the ie shell:

$ sbt "ensime generate"

      



NTN

+1


source


I had the same problem. After trying what you did, I solved it with the following additional steps:

  • Install the latest version (starting from the post, getting 0.12.3 from http://www.scala-sbt.org/release/docs/Getting-Started/Setup.html )
  • Edit the file project\build.properties

    and change sbt.version

    accordingly (in my case sbt.version=0.12.3

    )
  • Run sbt from the project root.

Since you have already changed the plugins file, this should set the ensime command. If you want to run it from the command line, don't forget to include the command ( sbt "ensime generate"

).

0


source







All Articles