我已根据README.md文件安装了ensime,但是,我在 inferior-ensime-server 缓冲区中出现以下错误:
INFO: Fatal Error: scala.tools.nsc.MissingRequirementError: object scala not found. scala.tools.nsc.MissingRequirementError: object scala not found. at scala.tools.nsc.symtab.Definitions$definitions$.getModuleOrClass(Definitions.scala:516) at scala.tools.nsc.symtab.Definitions$definitions$.ScalaPackage(Definitions.scala:43) at scala.tools.nsc.symtab.Definitions$definitions$.ScalaPackageClass(Definitions.scala:44) at scala.tools.nsc.symtab.Definitions$definitions$.UnitClass(Definitions.scala:89) at scala.tools.nsc.symtab.Definitions$definitions$.init(Definitions.scala:786) at scala.tools.nsc.Global$Run.(Global.scala:593) at scala.tools.nsc.interactive.Global$TyperRun.(Global.scala:473) at scala.tools.nsc.interactive.Global.newTyperRun(Global.scala:535) at scala.tools.nsc.interactive.Global.reloadSources(Global.scala:289) at scala.tools.nsc.interactive.Global$$anonfun$reload$1.apply(Global.scala:300) at scala.tools.nsc.interactive.Global$$anonfun$reload$1.apply(Global.scala:300) at scala.tools.nsc.interactive.Global.respond(Global.scala:276) at scala.tools.nsc.interactive.Global.reload(Global.scala:300) at scala.tools.nsc.interactive.CompilerControl$$anon$1.apply$mcV$sp(CompilerControl.scala:81) at scala.tools.nsc.interactive.Global.pollForWork(Global.scala:132) at scala.tools.nsc.interactive.Global$$anon$2.run(Global.scala:192)
也:
INFO: Fatal Error: scala.tools.nsc.MissingRequirementError: class scala.Array not found. scala.tools.nsc.MissingRequirementError: class scala.Array not found. at scala.tools.nsc.symtab.Definitions$definitions$.getModuleOrClass(Definitions.scala:516) at scala.tools.nsc.symtab.Definitions$definitions$.getClass(Definitions.scala:474) at scala.tools.nsc.symtab.Definitions$definitions$.ArrayClass(Definitions.scala:217) at scala.tools.nsc.backend.icode.TypeKinds$REFERENCE.(TypeKinds.scala:258) at scala.tools.nsc.backend.icode.GenICode$ICodePhase.(GenICode.scala:55) at scala.tools.nsc.backend.icode.GenICode.newPhase(GenICode.scala:43) at scala.tools.nsc.backend.icode.GenICode.newPhase(GenICode.scala:25) at scala.tools.nsc.Global$Run$$anonfun$4.apply(Global.scala:606) at scala.tools.nsc.Global$Run$$anonfun$4.apply(Global.scala:605) at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:62) at scala.collection.immutable.List.foreach(List.scala:46) at scala.tools.nsc.Global$Run.(Global.scala:605) at scala.tools.nsc.interactive.Global$TyperRun.(Global.scala:473) at scala.tools.nsc.interactive.Global.newTyperRun(Global.scala:535) at scala.tools.nsc.interactive.Global.reloadSources(Global.scala:289) at scala.tools.nsc.interactive.Global.typedTreeAt(Global.scala:309) at scala.tools.nsc.interactive.Global$$anonfun$getTypedTreeAt$1.apply(Global.scala:326) at scala.tools.nsc.interactive.Global$$anonfun$getTypedTreeAt$1.apply(Global.scala:326) at scala.tools.nsc.interactive.Global.respond(Global.scala:276) at scala.tools.nsc.interactive.Global.getTypedTreeAt(Global.scala:326) at scala.tools.nsc.interactive.CompilerControl$$anon$2.apply$mcV$sp(CompilerControl.scala:89) at scala.tools.nsc.interactive.Global.pollForWork(Global.scala:132) at scala.tools.nsc.interactive.Global$$anon$2.run(Global.scala:192)
此外,没有任何类型识别对我有用,如果我得到任何东西,我会得到'NA'。 C-c t导致emacs锁定。
我正在跑步:
Ubuntu 10.04(64位版本)
emacs 23.1.50.1
来自git的ensime(截至2010年5月3日)
scala是版本2.8.0.RC1
java是1.6.0_20(来自太阳)
这是日志的副本:http://dl.dropbox.com/u/5309017/ensime.log
谢谢!
杰夫
答案 0 :(得分:5)
“scala.tools.nsc.MissingRequirementError:找不到对象标量”通常表示无法找到标准的Scala库。看一下 inferior ensime server 缓冲区,它应该打印正在使用的类路径。这是我的摘录:
INFO:[Classpath = /usr/lib/jvm/java-6-openjdk/jre/lib/resources.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/rt.jar: /usr/lib/jvm/java-6-openjdk/jre/lib/jsse.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/jce.jar:/usr/lib/jvm/java -6-的openjdk / JRE / LIB / charsets.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/rhino.jar:/ usr / lib中/ JVM / JAVA -6-的openjdk / JRE / lib中/ext/dnsns.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/ext/pulse-java.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/ext /sunjce_provider.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-6-openjdk/jre/lib/ext/localedata.jar :/usr/lib/jvm/java-6-openjdk/jre/lib/ext/gnome-java-bridge.jar:/home/aemon/src/misc/ensime/lib/jnotify/jnotify-0.93.jar:/家/ aemon / SRC /杂项/ ensime / LIB /阶/阶-library.jar:/home/aemon/src/misc/ensime/lib/scala/scala-compiler.jar]
注意scala-library.jar,从结尾开始。您可能必须修改.ensime文件,以便:classpath字段指向库jar。