# Background Job - setup error

**URL:** <https://discuss.rubyonrails.org/t/background-job-setup-error/47247>\
**Category:** rubyonrails-talk\
**Created:** [November 1, 2009, 9:58pm UTC](https://discuss.rubyonrails.org/t/background-job-setup-error/47247 "2009-11-01T21:58:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bill\_Walton1](https://avatars.discourse-cdn.com/v4/letter/b/ba8739/32.png) [@Bill\_Walton1](https://discuss.rubyonrails.org/u/Bill_Walton1)\
**Post date:** [November 1, 2009, 9:58pm UTC](https://discuss.rubyonrails.org/t/background-job-setup-error/47247/1 "2009-11-01T21:58:31Z")

</div>

Greetings!

I'm trying to use Ara's Background Job on Windows and running into a problem. I've installed it as a gem and added "require 'bj'" at the end of environment.rb. When I run 'bj setup' i'm getting a "FATAL -- : not opened for reading (IOError)" message. The line in the stack trace before/under it takes me into instance\_method.rb where there's a call to Logger.new(\*log). The documentation says bj will write to its own log file, but it doesn't say anything about needing to set that up manually.

Anybody got experience getting Background Job set up on Windows? Or just some experience with Background Job and any ideas re: how I might get it setup?

Thanks much and in advance for any assistance.

Best regards, Bill

---

<div class="post-metadata">

**Author:** ![Changpeng\_Zhao](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@Changpeng\_Zhao](https://discuss.rubyonrails.org/u/Changpeng_Zhao)\
**Post date:** [November 29, 2009, 1:47pm UTC](https://discuss.rubyonrails.org/t/background-job-setup-error/47247/2 "2009-11-29T13:47:20Z")

</div>

same error here. Were you able to get around this?

Thanks,

Changpeng

---

<div class="post-metadata">

**Author:** ![Bill\_Walton1](https://avatars.discourse-cdn.com/v4/letter/b/ba8739/32.png) [@Bill\_Walton1](https://discuss.rubyonrails.org/u/Bill_Walton1)\
**Post date:** [November 29, 2009, 2:07pm UTC](https://discuss.rubyonrails.org/t/background-job-setup-error/47247/3 "2009-11-29T14:07:36Z")

</div>

Hi Changpeng,

> same error here. Were you able to get around this?

Yes, I was. I removed the '\*' from (\*log).

Line 80 in bj/lib/main/program/instance\_methods.rb now reads:

@logger = Logger.new(log)

Still don't understand what the '\*' was for. If you know (or anyone else can jump in here), I'd be very pleased to hear.

Best regards, Bill

---

<div class="post-metadata">

**Author:** ![Mike26](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@Mike26](https://discuss.rubyonrails.org/u/Mike26)\
**Post date:** [November 30, 2009, 4:20pm UTC](https://discuss.rubyonrails.org/t/background-job-setup-error/47247/4 "2009-11-30T16:20:53Z")

</div>

A timely thread, since I hit the same thing just now.

> Still don't understand what the '\*' was for. If you know (or anyone else can jump in here), I'd be very pleased to hear.

Would it be trying to expand an array? Dunno why, though.

I hit another problem shortly after: the automatic rake db:migrate step failed. Not a big deal, I ran it manually and commented out the line that failed.

Shortly after that, I got a job to submit and execute. Now to try in on a (Linux) server...

Mike

---

<div class="post-metadata">

**Author:** ![Changpeng\_Zhao](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@Changpeng\_Zhao](https://discuss.rubyonrails.org/u/Changpeng_Zhao)\
**Post date:** [November 30, 2009, 4:30pm UTC](https://discuss.rubyonrails.org/t/background-job-setup-error/47247/5 "2009-11-30T16:30:28Z")

</div>

Yeah, I hit the same rake error, but that was easier to over come.

I have a different problem now. (should I change the subject line?)

I am using BJ together with Worklings and Workling\_mailer (AsynchMail). I can see the job being added to the db and executed, with exit\_status 10752. But the email is not sent out. The env field is NULL.

I don’t know where is the problem now? Is it BJ, or workling? or incorrect SMTP setup? If I comment out the “include AsynchMail” line, emails works.

Changpeng Zhao
