学习ruby的时候,按照书中的例子进行实验,发现一个问题,同样的代码,当通过netbean启动服务的时候,如果访问购物车页面,会出现以下的异常:
ActionView::TemplateError (java.lang.NullPointerException: null) on line #41 of D:/NetBeans 6.0 Beta 1/ruby1/jruby-1.0.1/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/templates/rescues/_request_and_response.rhtml:
38: 
39: <p><a href="#" onclick="document.getElementById('session_dump').style.display='block'; return false;">Show session dump</a></p>
40: <div id="session_dump" style="display:none"><%= debug(request.session.instance_variable_get("@data")) %></div>
41: 
42: 
43: <h2 style="margin-top: 30px">Response</h2>
44: <b>Headers</b>: <%=h response ? response.headers.inspect.gsub(/,/, ",\n") : "None" %><br/>

    RubyBigDecimal.java:670:in `org.jruby.RubyBigDecimal.to_s'
    null:-1:in `org.jruby.RubyBigDecimalInvokerto_sxx1.call'
    FastInvocationCallback.java:49:in `org.jruby.runtime.callback.FastInvocationCallback.execute'
    SimpleCallbackMethod.java:81:in `org.jruby.internal.runtime.methods.SimpleCallbackMethod.call'
    AliasMethod.java:71:in `org.jruby.internal.runtime.methods.AliasMethod.call'
    EvaluationState.java:1025:in `org.jruby.evaluator.EvaluationState.fCallNode'
    EvaluationState.java:253:in `org.jruby.evaluator.EvaluationState.evalInternal'

但是通过cmd模式下启动服务,运行相同的代码的网页就没有任何的异常发生,不知道其他人是否遇到相同的问题,是怎样解决的。netbean的版本是6.0 beta
评论
mysttt 2007-10-04
NB ruby IDE 默认用的 自带的jruby, 如果你系统有ruby 就
tool -> option -> ruby -> platform
改一下ruby interpreter 的path
kaven 2007-09-29
把解释器改为c-ruby
linginfanta 2007-09-28
netbeans 6.0的新特性确实充满诱惑。
但beta版本有很多莫名其妙的问题。
lz可能也是等不及了的主。
建议还是等等吧。
发表评论

提醒: 该博客已发表在公共论坛,博客所有留言会成为论坛回贴,留言请注意遵守论坛发贴规则

您还没有登录,请登录后发表评论

yezi
搜索本博客
我的相册
76988825-a3a2-35e4-b837-75437d40ffca-thumb
IMG_7195
共 46 张
最近加入圈子
存档
最新评论