From: sto.mar@... Date: 2013-06-27T02:35:22+09:00 Subject: Re: Creating ruby script exe Am 26.06.2013 19:04, schrieb Rochit Sen: > Joel Pearson wrote in post #1113564: >> That's a side-effect of using the command --no-dep-run >> >> Here's the code sample I suggested before, with an extra note: >> >> def initialize >> >> # Allow EXE build without running. >> if defined?(Ocra) >> # Let OCRA pick up the cookies from Mechanize. >> Mechanize.new.cookies >> # Let OCRA pick up file-tail >> ... something that uses file-tail here... >> # Quit so Ocra can do its thing. >> exit >> end >> >> # Normal stuff goes here... >> @agent = Mechanize.new >> >> end > > Hi Joel, > Thanks. your suggestion worked. But when i run the exe i am getting > error: > "uninitialized constant yaml" and the exe exits. > I am using the YAML.load_file method in my script to read from a yaml > file That would rather be NameError: uninitialized constant YAML You probably forgot to require 'yaml'. Regards, Marcus --