Hi everyone. Backgroundrb is doing some really sweet stuff for my project. Thanks! I am trying to integrate backgroundrb with cruisecontrol.rb. I started off by creating a simple Rakefile::::: desc ''task for starting up backgroundrb'' task :cruise do template = <<-EOF :backgroundrb: :ip: 0.0.0.0 :port: 11006 :development: :backgroundrb: :log: foreground :test: :backgroundrb: :log: foreground :production: :backgroundrb: :log: foreground EOF backgroundrb_configuration = ERB.new(template).result(binding) #put backgroundrb_configuration, "#{RAILS_ROOT}/config/backgroundrb.yml" bfile = File.new("#{RAILS_ROOT}/config/backgroundrb.yml", "w") bfile.puts backgroundrb_configuration sh "chmod 755 #{RAILS_ROOT}/config/backgroundrb.yml" begin def shutmedown sh "ruby script/backgroundrb stop" end rescue ''got hereer.'' end sh "ruby script/backgroundrb start" end ---------------------------------------------- /home/ian/bluffware/backend/vendor/plugins/backgroundrb/lib/backgroundrb/bdrb_config.rb:38:in `read_config'': undefined method `[]'' for false:FalseClass (NoMethodError) from /home/ian/bluffware/backend/vendor/plugins/backgroundrb/lib/backgroundrb.rb:15:in `init'' from /home/ian/bluffware/backend/vendor/plugins/backgroundrb/lib/backgroundrb.rb:175 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in'' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'' from /home/ian/bluffware/backend/vendor/plugins/backgroundrb/init.rb:2:in `evaluate_init_rb'' ... 11 levels... ....................... I looked at the line in question (~/vendor/plugins/backgroundrb/lib/backgroundrb/bdrb_config.rb:38) and added some output to see what is going on lines 28-32::: def self.read_config(config_file) #my debugging info.. puts config_file puts File.exist?(config_file) puts IO.read(config_file) puts YAML.load(ERB.new(IO.read(config_file)).result) config = YAML.load(ERB.new(IO.read(config_file)).result) environment = RAILS_ENV.to_sym File.exists says it sees my conf file but IO.read doesn''t see anything. This is strange cause I can repeat this process in irb and everything is there. Also, the conf file is definitely getting generated cause it''s there after the fact. Does anyone see what I might be overlooking?
greets- I must''ve been off my rocker yesterday. I have it fixed and it''s running now. Now all my functional tests using backgroundrb are running again! -Ian On 12:12 Mon 09 Jun , ian eyberg wrote:> Hi everyone. > Backgroundrb is doing some really sweet stuff for my project. Thanks! > > I am trying to integrate backgroundrb with cruisecontrol.rb. I started > off by creating a simple Rakefile::::: > > desc ''task for starting up backgroundrb'' > task :cruise do > template = <<-EOF > > :backgroundrb: > :ip: 0.0.0.0 > :port: 11006 > > :development: > :backgroundrb: > :log: foreground > > :test: > :backgroundrb: > :log: foreground > > :production: > :backgroundrb: > :log: foreground > > EOF > backgroundrb_configuration = ERB.new(template).result(binding) > #put backgroundrb_configuration, "#{RAILS_ROOT}/config/backgroundrb.yml" > > bfile = File.new("#{RAILS_ROOT}/config/backgroundrb.yml", "w") > bfile.puts backgroundrb_configuration > sh "chmod 755 #{RAILS_ROOT}/config/backgroundrb.yml" > > begin > def shutmedown > sh "ruby script/backgroundrb stop" > end > > rescue > ''got hereer.'' > end > sh "ruby script/backgroundrb start" > end > > ---------------------------------------------- > /home/ian/bluffware/backend/vendor/plugins/backgroundrb/lib/backgroundrb/bdrb_config.rb:38:in > `read_config'': undefined method `[]'' for false:FalseClass (NoMethodError) > from > /home/ian/bluffware/backend/vendor/plugins/backgroundrb/lib/backgroundrb.rb:15:in > `init'' > from > /home/ian/bluffware/backend/vendor/plugins/backgroundrb/lib/backgroundrb.rb:175 > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require'' > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require'' > from > /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in > `require'' > from > /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in > `new_constants_in'' > from > /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in > `require'' > from > /home/ian/bluffware/backend/vendor/plugins/backgroundrb/init.rb:2:in > `evaluate_init_rb'' > ... 11 levels... > .......................
For everyone else''s benefit, was this a problem with your rake task? Also, is this the only thing you''ve added to integrate backgroundrb with cruisecontrol.rb? I would be really interested in doing this in my own project. On Tue, Jun 10, 2008 at 9:49 AM, ian eyberg <ian at telematter.com> wrote:> greets- > I must''ve been off my rocker yesterday. I have it fixed and it''s running > now. > Now all my functional tests using backgroundrb are running again! > > -Ian > > On 12:12 Mon 09 Jun , ian eyberg wrote: > > Hi everyone. > > Backgroundrb is doing some really sweet stuff for my project. Thanks! > > > > I am trying to integrate backgroundrb with cruisecontrol.rb. I started > > off by creating a simple Rakefile::::: > > > > desc ''task for starting up backgroundrb'' > > task :cruise do > > template = <<-EOF > > > > :backgroundrb: > > :ip: 0.0.0.0 > > :port: 11006 > > > > :development: > > :backgroundrb: > > :log: foreground > > > > :test: > > :backgroundrb: > > :log: foreground > > > > :production: > > :backgroundrb: > > :log: foreground > > > > EOF > > backgroundrb_configuration = ERB.new(template).result(binding) > > #put backgroundrb_configuration, > "#{RAILS_ROOT}/config/backgroundrb.yml" > > > > bfile = File.new("#{RAILS_ROOT}/config/backgroundrb.yml", "w") > > bfile.puts backgroundrb_configuration > > sh "chmod 755 #{RAILS_ROOT}/config/backgroundrb.yml" > > > > begin > > def shutmedown > > sh "ruby script/backgroundrb stop" > > end > > > > rescue > > ''got hereer.'' > > end > > sh "ruby script/backgroundrb start" > > end > > > > ---------------------------------------------- > > > /home/ian/bluffware/backend/vendor/plugins/backgroundrb/lib/backgroundrb/bdrb_config.rb:38:in > > `read_config'': undefined method `[]'' for false:FalseClass (NoMethodError) > > from > > > /home/ian/bluffware/backend/vendor/plugins/backgroundrb/lib/backgroundrb.rb:15:in > > `init'' > > from > > > /home/ian/bluffware/backend/vendor/plugins/backgroundrb/lib/backgroundrb.rb:175 > > from > /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > > `gem_original_require'' > > from > /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > > `require'' > > from > > > /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in > > `require'' > > from > > > /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in > > `new_constants_in'' > > from > > > /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in > > `require'' > > from > > /home/ian/bluffware/backend/vendor/plugins/backgroundrb/init.rb:2:in > > `evaluate_init_rb'' > > ... 11 levels... > > ....................... > _______________________________________________ > Backgroundrb-devel mailing list > Backgroundrb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/backgroundrb-devel >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080610/3354c2f2/attachment-0001.html>