1

I have installed gem rvpacker gem. From command runs fine but I want to set its options. I have this method by now

def runPacker(dir, type)
  puts dir
  puts type
  begin
    rvpacker -V -f -d #{dir} -t ace -a #{type}
  rescue Exception =>e
    puts "Error!"
    puts e.message
    puts e.backtrace.inspect 
    return 1
  end
  return 0
end

How to write this rvpacker line by using my parameters?

It's the script which I will run from Java App by using JRuby. When I call this command from JRuby directly I got

org.jruby.embed.ParseFailedException: (SyntaxError) <script>:1: syntax error, unexpected tUMINUS
rvpacker -V -f -d P:\temp-workspace\RPGTestProject1 -t ace -a unpack

But when I write it in console directly it's fine.

2 Answers 2

0

rvpacker -V -f -d #{dir} -t ace -a #{type} this is not ruby code and I wanted to execute it from ruby interpreter ;) Ave me!

Sign up to request clarification or add additional context in comments.

Comments

-1

If I've understood your question right, then I think you'll find the answer here. For instance, you could wrap your command in a system call so that instead of the line:

rvpacker -V -f -d #{dir} -t ace -a #{type}

you would use

system "rvpacker -V -f -d #{dir} -t ace -a #{type}"

4 Comments

Please include relevant information from the link in your answer, or your answer may be deleted. You can keep the link for reference. Link-only answers can become invalid if the linked page changes.
@BrettWalker I hope that's enough to undo the downvote ?
It was not I who down voted. But thank you for improving your answer.
K, thanks ... obviously I'm still learning what's expected here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.