如何将Rails.cache与哈希一起使用?

时间:2017-06-26 18:37:11

标签: ruby-on-rails ruby caching jruby

我试图在控制器中缓存哈希值。

NoMethodError: undefined method `call' for nil:NilClass
Did you mean?  caller
from org/jruby/RubyMarshal.java:145:in `load'

但它不起作用。

data
    .join(data2, Seq("id"), "inner")
    .select($"id", $"text")
    .map(x => (x.getString(0), x.getString(1)).productIterator.mkString("\t"))
    .saveAsTextFile("/hdfs/filepath/output.tsv")

http://guides.rubyonrails.org/caching_with_rails.html#low-level-caching

0 个答案:

没有答案