From: dusty Date: 2008-07-22T21:44:29+09:00 Subject: Re: bj and rails 2.1 - can't get bj to run jobs One more thing. I also have problems submitting via command-line. [dusty@dustylaptop:~/tester] $ ./script/bj submit cat /etc/password F, [2008-07-22T12:38:34.993286 #2555] FATAL -- : can't convert nil into String (TypeError) ./script/bj:434:in `open' ./script/bj:434:in `run' /Users/dusty/tester/vendor/plugins/bj/lib/main/base.rb:25:in `call' /Users/dusty/tester/vendor/plugins/bj/lib/main/base.rb:25:in `run' /Users/dusty/tester/vendor/plugins/bj/lib/main/base.rb:13:in `catch' /Users/dusty/tester/vendor/plugins/bj/lib/main/base.rb:13:in `run' /Users/dusty/tester/vendor/plugins/bj/lib/main/base.rb:436:in `mode_run!' /Users/dusty/tester/vendor/plugins/bj/lib/main/base.rb:10:in `run' /Users/dusty/tester/vendor/plugins/bj/lib/main/factories.rb:11:in `run' /Users/dusty/tester/vendor/plugins/bj/lib/main/factories.rb:16:in `Main' ./script/bj:6 Looks like that's failing on this line: open(file){|io| joblist.push(Bj.joblist.jobs_from_io(io)) } Any ideas on that one? Also, is there a better place for this? I see there is a bug on this in rubyforge, but its pretty old. Should I still submit things like this to rubyforge instead of this mailing list? Thanks ------- mode "submit" do keyword("file"){ argument :required attr } def run joblist = Bj.joblist.for argv.join(' ') case file when "-" joblist.push(Bj.joblist.jobs_from_io(STDIN)) when "--", "---" joblist.push(Bj.joblist.jobs_from_yaml(STDIN)) else open(file){|io| joblist.push(Bj.joblist.jobs_from_io(io)) } end jobs = Bj.submit joblist, :no_tickle => true oh = lambda{|job| OrderedHash["id", job.id, "command", job.command]} y jobs.map{|job| oh[job]} end end