首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >‘`rvm install jruby`’with Psych::SyntaxError

‘`rvm install jruby`’with Psych::SyntaxError
EN

Stack Overflow用户
提问于 2014-01-04 17:59:02
回答 1查看 314关注 0票数 0

为了尝试并开始使用jruby上的rails项目,我从昨天起就一直尝试将rvm用于rvm install jruby,并且对通常形式的错误感到有些沮丧:

Psych::SyntaxError: (<unknown>): found character '\t(TAB)' that cannot start any token. (Do not use \t(TAB) for indentation)

这里是一个完整日志的文件,如果有任何有用的信息可以在那里找到。

这里rvm install ruby的更新pastee (没有--1.9参数)。

~./gemrc含量

代码语言:javascript
复制
install:    --no-rdoc   --no-ri
update:     --no-rdoc   --no-ri

/etc/gemrc是空白的。

这是安装日志,rubygems.install.log

代码语言:javascript
复制
[2014-01-05 19:22:32] /home/petey/.rvm/rubies/jruby-1.7.9/bin/ruby
current path: /home/petey/.rvm/src/rubygems-2.2.0
GEM_HOME=/home/petey/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0
PATH=/home/petey/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/bin:/home/petey/.rvm/gems/ruby-2.0.0-p247@global/bin:/home/petey/.rvm/rubies/ruby-2.0.0-p247/bin:/home/petey/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
GEM_PATH=/home/petey/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0:/home/petey/.rvm/gems/ruby-2.0.0-p247@global
command(6): env GEM_PATH=/home/petey/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0:/home/petey/.rvm/gems/ruby-2.0.0-p247@global:/home/petey/.rvm/gems/ruby-2.0.0-p247@global GEM_HOME=/home/petey/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0 /home/petey/.rvm/rubies/jruby-1.7.9/bin/ruby -d /home/petey/.rvm/src/rubygems-2.2.0/setup.rb
java.lang.ClassNotFoundException: rubygems.defaults.OperatingSystemService
  at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
  at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
  at org.jruby.util.JRubyClassLoader.findClass(JRubyClassLoader.java:128)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Class.java:270)
  at org.jruby.javasupport.JavaSupport.loadJavaClass(JavaSupport.java:166)
  at org.jruby.runtime.load.LoadService$ExtensionSearcher.trySearch(LoadService.java:814)
  at org.jruby.runtime.load.LoadService.findFileForLoad(LoadService.java:411)
  at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:560)
  at org.jruby.runtime.load.LoadService.requireCommon(LoadService.java:457)
  at org.jruby.runtime.load.LoadService.require(LoadService.java:421)
  at org.jruby.RubyKernel.requireCommon(RubyKernel.java:1089)
  at org.jruby.RubyKernel.require19(RubyKernel.java:1083)
  at org.jruby.RubyKernel$INVOKER$s$1$0$require19.call(RubyKernel$INVOKER$s$1$0$require19.gen)
  at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:350)
  at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
  at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
  at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  at org.jruby.ast.RescueNode.executeBody(RescueNode.java:221)
  at org.jruby.ast.RescueNode.interpret(RescueNode.java:116)
  at org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
  at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  at org.jruby.ast.IfNode.interpret(IfNode.java:118)
  at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  at org.jruby.ast.RootNode.interpret(RootNode.java:129)
  at org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:121)
  at org.jruby.Ruby.runInterpreter(Ruby.java:838)
  at org.jruby.Ruby.loadFile(Ruby.java:2727)
  at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:66)
  at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:959)
  at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:573)
  at org.jruby.runtime.load.LoadService.requireCommon(LoadService.java:457)
  at org.jruby.runtime.load.LoadService.require(LoadService.java:421)
  at org.jruby.RubyKernel.requireCommon(RubyKernel.java:1089)
  at org.jruby.RubyKernel.require19(RubyKernel.java:1083)
  at org.jruby.RubyKernel$INVOKER$s$1$0$require19.call(RubyKernel$INVOKER$s$1$0$require19.gen)
  at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:350)
  at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
  at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
  at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  at org.jruby.ast.RescueNode.executeBody(RescueNode.java:221)
  at org.jruby.ast.RescueNode.interpret(RescueNode.java:116)
  at org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
  at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  at org.jruby.ast.RootNode.interpret(RootNode.java:129)
  at org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:121)
  at org.jruby.Ruby.runInterpreter(Ruby.java:838)
  at org.jruby.Ruby.loadFile(Ruby.java:2727)
  at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:66)
  at org.jruby.runtime.load.LoadService.load(LoadService.java:359)
  at org.jruby.RubyKernel.loadCommon(RubyKernel.java:1107)
  at org.jruby.RubyKernel.load19(RubyKernel.java:1099)
  at org.jruby.RubyKernel$INVOKER$s$0$1$load19.call(RubyKernel$INVOKER$s$0$1$load19.gen)
  at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:210)
  at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
  at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
  at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
  at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  at org.jruby.ast.IfNode.interpret(IfNode.java:118)
  at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  at org.jruby.ast.RootNode.interpret(RootNode.java:129)
  at org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:121)
  at org.jruby.Ruby.runInterpreter(Ruby.java:838)
  at org.jruby.Ruby.loadFile(Ruby.java:2727)
  at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:66)
  at org.jruby.runtime.load.LoadService.loadFromClassLoader(LoadService.java:385)
  at org.jruby.Ruby.initRubyKernel(Ruby.java:1722)
  at org.jruby.Ruby.init(Ruby.java:1201)
  at org.jruby.Ruby.newInstance(Ruby.java:278)
  at org.jruby.Main.internalRun(Main.java:258)
  at org.jruby.Main.run(Main.java:217)
  at org.jruby.Main.main(Main.java:197)
java.lang.ClassNotFoundException: rubygems.defaults.JrubyNativeService
  at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
  at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
  at org.jruby.util.JRubyClassLoader.findClass(JRubyClassLoader.java:128)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Class.java:270)
  at org.jruby.javasupport.JavaSupport.loadJavaClass(JavaSupport.java:166)
  at org.jruby.runtime.load.LoadService$ExtensionSearcher.trySearch(LoadService.java:814)
  at org.jruby.runtime.load.LoadService.findFileForLoad(LoadService.java:411)
  at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:560)
  at org.jruby.runtime.load.LoadService.requireCommon(LoadService.java:457)
  at org.jruby.runtime.load.LoadService.require(LoadService.java:421)
  at org.jruby.RubyKernel.requireCommon(RubyKernel.java:1089)
  at org.jruby.RubyKernel.require19(RubyKernel.java:1083)
  at org.jruby.RubyKernel$INVOKER$s$1$0$require19.call(RubyKernel$INVOKER$s$1$0$require19.gen)
  at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:350)
  at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
  at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
  at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  at org.jruby.ast.RescueNode.executeBody(RescueNode.java:221)
  at org.jruby.ast.RescueNode.interpret(RescueNode.java:116)
  at org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
  at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  at org.jruby.ast.RootNode.interpret(RootNode.java:129)
  at org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:121)
  at org.jruby.Ruby.runInterpreter(Ruby.java:838)
  at org.jruby.Ruby.loadFile(Ruby.java:2727)
  at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:66)
  at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:959)
  at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:573)
  at org.jruby.runtime.load.LoadService.requireCommon(LoadService.java:457)
  at org.jruby.runtime.load.LoadService.require(LoadService.java:421)
  at org.jruby.RubyKernel.requireCommon(RubyKernel.java:1089)
  at org.jruby.RubyKernel.require19(RubyKernel.java:1083)
  at org.jruby.RubyKernel$INVOKER$s$1$0$require19.call(RubyKernel$INVOKER$s$1$0$require19.gen)
  at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:350)
  at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
  at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
  at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  at org.jruby.ast.RescueNode.executeBody(RescueNode.java:221)
  at org.jruby.ast.RescueNode.interpret(RescueNode.java:116)
  at org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
  at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  at org.jruby.ast.IfNode.interpret(IfNode.java:116)
  at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  at org.jruby.ast.IfNode.interpret(IfNode.java:118)
  at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  at org.jruby.ast.RootNode.interpret(RootNode.java:129)
  at org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:121)
  at org.jruby.Ruby.runInterpreter(Ruby.java:838)
  at org.jruby.Ruby.loadFile(Ruby.java:2727)
  at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:66)
  at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:959)
  at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:573)
  at org.jruby.runtime.load.LoadService.requireCommon(LoadService.java:457)
  at org.jruby.runtime.load.LoadService.require(LoadService.java:421)
  at org.jruby.RubyKernel.requireCommon(RubyKernel.java:1089)
  at org.jruby.RubyKernel.require19(RubyKernel.java:1083)
  at org.jruby.RubyKernel$INVOKER$s$1$0$require19.call(RubyKernel$INVOKER$s$1$0$require19.gen)
  at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:350)
  at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
  at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
  at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  at org.jruby.ast.RescueNode.executeBody(RescueNode.java:221)
  at org.jruby.ast.RescueNode.interpret(RescueNode.java:116)
  at org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
  at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  at org.jruby.ast.RootNode.interpret(RootNode.java:129)
  at org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:121)
  at org.jruby.Ruby.runInterpreter(Ruby.java:838)
  at org.jruby.Ruby.loadFile(Ruby.java:2727)
  at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:66)
  at org.jruby.runtime.load.LoadService.load(LoadService.java:359)
  at org.jruby.RubyKernel.loadCommon(RubyKernel.java:1107)
  at org.jruby.RubyKernel.load19(RubyKernel.java:1099)
  at org.jruby.RubyKernel$INVOKER$s$0$1$load19.call(RubyKernel$INVOKER$s$0$1$load19.gen)
  at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:210)
  at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:206)
  at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
  at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
  at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
  at org.jruby.ast.IfNode.interpret(IfNode.java:118)
  at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
  at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  at org.jruby.ast.RootNode.interpret(RootNode.java:129)
  at org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:121)
  at org.jruby.Ruby.runInterpreter(Ruby.java:838)
  at org.jruby.Ruby.loadFile(Ruby.java:2727)
  at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:66)
  at org.jruby.runtime.load.LoadService.loadFromClassLoader(LoadService.java:385)
  at org.jruby.Ruby.initRubyKernel(Ruby.java:1722)
  at org.jruby.Ruby.init(Ruby.java:1201)
  at org.jruby.Ruby.newInstance(Ruby.java:278)
  at org.jruby.Main.internalRun(Main.java:258)
  at org.jruby.Main.run(Main.java:217)
  at org.jruby.Main.main(Main.java:197)
Psych::SyntaxError: (<unknown>): found character   '\t(TAB)' that cannot start any token. (Do not use \t(TAB) for indentation) while scanning for the next token at line 1 column 9
             parse at org/jruby/ext/psych/PsychParser.java:215
      parse_stream at /home/petey/.rvm/rubies/jruby-1.7.9/lib/ruby/shared/psych.rb:205
             parse at /home/petey/.rvm/rubies/jruby-1.7.9/lib/ruby/shared/psych.rb:153
              load at /home/petey/.rvm/rubies/jruby-1.7.9/lib/ruby/shared/psych.rb:129
         load_file at /home/petey/.rvm/src/rubygems-2.2.0/lib/rubygems/config_file.rb:332
        initialize at /home/petey/.rvm/src/rubygems-2.2.0/lib/rubygems/config_file.rb:197
  do_configuration at /home/petey/.rvm/src/rubygems-2.2.0/lib/rubygems/gem_runner.rb:74
               run at /home/petey/.rvm/src/rubygems-2.2.0/lib/rubygems/gem_runner.rb:39
            (root) at setup.rb:45
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-01-06 05:14:01

~./gemrc包含:

代码语言:javascript
复制
install:    --no-rdoc   --no-ri
update:     --no-rdoc   --no-ri

移除制表符,用空格替换它们,修复问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20924582

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档