I try to call FSDirectory.open
FSDirectory.open(File.open('index', 'w+'))
NameError: no method 'open' for arguments (org.jruby.RubyFile) on Java::OrgApacheLuceneStore::FSDirectory
String gives a similar error.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
FSDirectory.open takes a java.io.File, which has no real equivalent in Ruby. Ruby’s “File” represents an open file, while java.io.File simply represents a path. You should just use java.io.File in this case.