'ensime generate'不是有效的sbt命令 [英] 'ensime generate' is not a valid sbt command
问题描述
http://jawher.net/2011/01/17/scala-development-environment-emacs-sbt-ensime /
我遇到的问题是,我无法让sbt生成配置文件,因为'ensime generate'命令似乎不是部分的sbt命令集。
[输出]
[info]构建项目ScalaTest 1.0反对Scala 2.9.2
[info]使用sbt.DefaultProject与sbt 0.7.7和Scala 2.7.7
[error]没有名为ensime的方法存在。
[info]为可用项目操作和方法的列表执行命令或操作列表的帮助。
[info]
[info]总时间:0 s,完成时间2013年1月26日12:53:48
[info]
[info]总会话时间:0 s,完成时间2013年1月26日12:53:48
[error]构建时出错。
[步骤之后]
cd< project directory> (sbt项目根)
sbt'ensime生成'
[版本信息]
sbt 0.7.7
ensime 2.9.2-0.9.8.1
scala 2.9.2
[emacs配置]
(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 /
(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)
任何帮助赞赏(我已经检查了所有的路径,所以请不要有任何意见)
Cheers,
JLove
似乎你需要在shell上引用命令ie:
$ sbtensime generate
HTH
I'm trying to use sbt to generate an ensime configuration file as described in this tutorial:
http://jawher.net/2011/01/17/scala-development-environment-emacs-sbt-ensime/
The issue I'm having is that I cannot get sbt to generate a configuration file as the 'ensime generate' command does not appear to be 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 info]
sbt 0.7.7
ensime 2.9.2-0.9.8.1
scala 2.9.2
[emacs configuration]
(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 appreciated (I've checked all the paths so please no comments regarding this)
Cheers,
JLove
it seems you need to quote the command on the shell i.e.:
$ sbt "ensime generate"
HTH
这篇关于'ensime generate'不是有效的sbt命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!