From noreply at rubyforge.org Wed Jun 20 10:26:29 2012 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 20 Jun 2012 10:26:29 +0000 (UTC) Subject: [test-unit-tracker] [ test-unit-Bugs-29595 ] Pow server fails to load a Rails app using the latest test-unit library because of the new Gemspec file Message-ID: <20120620102630.01ED42E05D@rubyforge.org> Bugs item #29595, was opened at 20/06/2012 10:26 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=21856&aid=29595&group_id=5650 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Jean-Denis Koeck (jd_kk) Assigned to: Nobody (None) Summary: Pow server fails to load a Rails app using the latest test-unit library because of the new Gemspec file Initial Comment: Hello, I'm using test-unit in a rails project running on the Pow server. I had an issue with the test output that was fixed on the development version of test-unit, so I switched to the latest development version (ui console: show multiline fault message pretty d15173f63de535d5e87ce92fabf86691fac46aff). The pow server then stopped loading my rails app properly: === stack trace === ArgumentError: invalid byte sequence in US-ASCII ~/.rvm/gems/ruby-1.9.3-p194 at rails3tutorial2ndEd/bundler/gems/test-unit-d15173f63de5/test-unit.gemspec:18:in `split' ~/.rvm/gems/ruby-1.9.3-p194 at rails3tutorial2ndEd/bundler/gems/test-unit-d15173f63de5/test-unit.gemspec:18:in `block in
' ~/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1368:in `initialize' ~/.rvm/gems/ruby-1.9.3-p194 at rails3tutorial2ndEd/bundler/gems/test-unit-d15173f63de5/test-unit.gemspec:11:in `new' ~/.rvm/gems/ruby-1.9.3-p194 at rails3tutorial2ndEd/bundler/gems/test-unit-d15173f63de5/test-unit.gemspec:11:in `
' ~/.rvm/gems/ruby-1.9.3-p194 at global/gems/bundler-1.1.3/lib/bundler.rb:280:in `eval' ~/.rvm/gems/ruby-1.9.3-p194 at global/gems/bundler-1.1.3/lib/bundler.rb:280:in `rescue in block in load_gemspec' ~/.rvm/gems/ruby-1.9.3-p194 at global/gems/bundler-1.1.3/lib/bundler.rb:275:in `block in load_gemspec' ~/.rvm/gems/ruby-1.9.3-p194 at global/gems/bundler-1.1.3/lib/bundler.rb:273:in `chdir' ~/.rvm/gems/ruby-1.9.3-p194 at global/gems/bundler-1.1.3/lib/bundler.rb:273:in `load_gemspec' ... === end of stack trace === The complete stack trace is in the attachments. Oddly, the application kept loading fine on the command line (with console or rake test). I think I found out why. Pow keeps the ruby 1.9 default encoding, US-ASCII. It just so happens the new gemspec file in test-unit parses README.textfile, which comprises non-ASCII characters (in the name of contributor Diego Petten?). Thus the encoding error. One way to fix this, and *any possible future problems with encoding* would be to simply force the encoding in the Gemspec file on line 18. Instead of : === code === entries = File.read("README.textile").split(/^h2\.\s(.*)$/) === end of code === Use : === code === entries = File.read("README.textile", :encoding => 'utf-8').split(/^h2\.\s(.*)$/) === end of code === Is that acceptable? In the meantime, I just force the default encoding to UTF-8 in my config.ru file (the one used by pow to start my app as a rack application). Thanks for the great work on test-unit, Jean-Denis Koeck ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=21856&aid=29595&group_id=5650 From noreply at rubyforge.org Wed Jun 20 12:23:06 2012 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 20 Jun 2012 12:23:06 +0000 (UTC) Subject: [test-unit-tracker] [ test-unit-Bugs-29595 ] Pow server fails to load a Rails app using the latest test-unit library because of the new Gemspec file Message-ID: <20120620122306.B5E762E05D@rubyforge.org> Bugs item #29595, was opened at 2012-06-20 19:26 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=21856&aid=29595&group_id=5650 Category: None Group: None >Status: Closed Resolution: None Priority: 3 Submitted By: Jean-Denis Koeck (jd_kk) Assigned to: Nobody (None) Summary: Pow server fails to load a Rails app using the latest test-unit library because of the new Gemspec file Initial Comment: Hello, I'm using test-unit in a rails project running on the Pow server. I had an issue with the test output that was fixed on the development version of test-unit, so I switched to the latest development version (ui console: show multiline fault message pretty d15173f63de535d5e87ce92fabf86691fac46aff). The pow server then stopped loading my rails app properly: === stack trace === ArgumentError: invalid byte sequence in US-ASCII ~/.rvm/gems/ruby-1.9.3-p194 at rails3tutorial2ndEd/bundler/gems/test-unit-d15173f63de5/test-unit.gemspec:18:in `split' ~/.rvm/gems/ruby-1.9.3-p194 at rails3tutorial2ndEd/bundler/gems/test-unit-d15173f63de5/test-unit.gemspec:18:in `block in
' ~/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1368:in `initialize' ~/.rvm/gems/ruby-1.9.3-p194 at rails3tutorial2ndEd/bundler/gems/test-unit-d15173f63de5/test-unit.gemspec:11:in `new' ~/.rvm/gems/ruby-1.9.3-p194 at rails3tutorial2ndEd/bundler/gems/test-unit-d15173f63de5/test-unit.gemspec:11:in `
' ~/.rvm/gems/ruby-1.9.3-p194 at global/gems/bundler-1.1.3/lib/bundler.rb:280:in `eval' ~/.rvm/gems/ruby-1.9.3-p194 at global/gems/bundler-1.1.3/lib/bundler.rb:280:in `rescue in block in load_gemspec' ~/.rvm/gems/ruby-1.9.3-p194 at global/gems/bundler-1.1.3/lib/bundler.rb:275:in `block in load_gemspec' ~/.rvm/gems/ruby-1.9.3-p194 at global/gems/bundler-1.1.3/lib/bundler.rb:273:in `chdir' ~/.rvm/gems/ruby-1.9.3-p194 at global/gems/bundler-1.1.3/lib/bundler.rb:273:in `load_gemspec' ... === end of stack trace === The complete stack trace is in the attachments. Oddly, the application kept loading fine on the command line (with console or rake test). I think I found out why. Pow keeps the ruby 1.9 default encoding, US-ASCII. It just so happens the new gemspec file in test-unit parses README.textfile, which comprises non-ASCII characters (in the name of contributor Diego Petten?). Thus the encoding error. One way to fix this, and *any possible future problems with encoding* would be to simply force the encoding in the Gemspec file on line 18. Instead of : === code === entries = File.read("README.textile").split(/^h2\.\s(.*)$/) === end of code === Use : === code === entries = File.read("README.textile", :encoding => 'utf-8').split(/^h2\.\s(.*)$/) === end of code === Is that acceptable? In the meantime, I just force the default encoding to UTF-8 in my config.ru file (the one used by pow to start my app as a rack application). Thanks for the great work on test-unit, Jean-Denis Koeck ---------------------------------------------------------------------- >Comment By: Kouhei Sutou (kou) Date: 2012-06-20 21:23 Message: Thanks for your report! I've fixed it in master. But I don't use your suggestion. Your code doesn't work with Ruby 1.8. :< ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=21856&aid=29595&group_id=5650 From noreply at rubyforge.org Thu Jun 21 08:09:31 2012 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 21 Jun 2012 08:09:31 +0000 (UTC) Subject: [test-unit-tracker] [ test-unit-Bugs-29595 ] Pow server fails to load a Rails app using the latest test-unit library because of the new Gemspec file Message-ID: <20120621080931.73E132E071@rubyforge.org> Bugs item #29595, was opened at 20/06/2012 10:26 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=21856&aid=29595&group_id=5650 Category: None Group: None Status: Closed Resolution: None Priority: 3 Submitted By: Jean-Denis Koeck (jd_kk) Assigned to: Nobody (None) Summary: Pow server fails to load a Rails app using the latest test-unit library because of the new Gemspec file Initial Comment: Hello, I'm using test-unit in a rails project running on the Pow server. I had an issue with the test output that was fixed on the development version of test-unit, so I switched to the latest development version (ui console: show multiline fault message pretty d15173f63de535d5e87ce92fabf86691fac46aff). The pow server then stopped loading my rails app properly: === stack trace === ArgumentError: invalid byte sequence in US-ASCII ~/.rvm/gems/ruby-1.9.3-p194 at rails3tutorial2ndEd/bundler/gems/test-unit-d15173f63de5/test-unit.gemspec:18:in `split' ~/.rvm/gems/ruby-1.9.3-p194 at rails3tutorial2ndEd/bundler/gems/test-unit-d15173f63de5/test-unit.gemspec:18:in `block in
' ~/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1368:in `initialize' ~/.rvm/gems/ruby-1.9.3-p194 at rails3tutorial2ndEd/bundler/gems/test-unit-d15173f63de5/test-unit.gemspec:11:in `new' ~/.rvm/gems/ruby-1.9.3-p194 at rails3tutorial2ndEd/bundler/gems/test-unit-d15173f63de5/test-unit.gemspec:11:in `
' ~/.rvm/gems/ruby-1.9.3-p194 at global/gems/bundler-1.1.3/lib/bundler.rb:280:in `eval' ~/.rvm/gems/ruby-1.9.3-p194 at global/gems/bundler-1.1.3/lib/bundler.rb:280:in `rescue in block in load_gemspec' ~/.rvm/gems/ruby-1.9.3-p194 at global/gems/bundler-1.1.3/lib/bundler.rb:275:in `block in load_gemspec' ~/.rvm/gems/ruby-1.9.3-p194 at global/gems/bundler-1.1.3/lib/bundler.rb:273:in `chdir' ~/.rvm/gems/ruby-1.9.3-p194 at global/gems/bundler-1.1.3/lib/bundler.rb:273:in `load_gemspec' ... === end of stack trace === The complete stack trace is in the attachments. Oddly, the application kept loading fine on the command line (with console or rake test). I think I found out why. Pow keeps the ruby 1.9 default encoding, US-ASCII. It just so happens the new gemspec file in test-unit parses README.textfile, which comprises non-ASCII characters (in the name of contributor Diego Petten?). Thus the encoding error. One way to fix this, and *any possible future problems with encoding* would be to simply force the encoding in the Gemspec file on line 18. Instead of : === code === entries = File.read("README.textile").split(/^h2\.\s(.*)$/) === end of code === Use : === code === entries = File.read("README.textile", :encoding => 'utf-8').split(/^h2\.\s(.*)$/) === end of code === Is that acceptable? In the meantime, I just force the default encoding to UTF-8 in my config.ru file (the one used by pow to start my app as a rack application). Thanks for the great work on test-unit, Jean-Denis Koeck ---------------------------------------------------------------------- >Comment By: Jean-Denis Koeck (jd_kk) Date: 21/06/2012 08:09 Message: Thank you for the quick fix (less than two hours!). I can confirm that my app is working fine now. I'm not surprised my suggestion was faulty, I've only been using ruby for a month now. Lesson learned! ---------------------------------------------------------------------- Comment By: Kouhei Sutou (kou) Date: 20/06/2012 12:23 Message: Thanks for your report! I've fixed it in master. But I don't use your suggestion. Your code doesn't work with Ruby 1.8. :< ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=21856&aid=29595&group_id=5650