Skip to content

Instantly share code, notes, and snippets.

@jonleighton
Created November 7, 2011 10:06
Show Gist options
  • Save jonleighton/1344600 to your computer and use it in GitHub Desktop.
Save jonleighton/1344600 to your computer and use it in GitHub Desktop.

I need to find out if this bug [http://redmine.ruby-lang.org/issues/5564] is reproducible on a platform other than Linux. (I suspect it is, but want to check.)

You need:

  1. A Mac or Windows
  2. The Rails test suite / repo set up on your computer
  3. ruby-1.9.3p0

Here's what to do:

  1. cd into actionpack/ and do a git pull on the master branch
  2. open lib/action_view/template.rb and comment the conditional block starting with if defined?(RUBY_ENGINE) (this disables a workaround for the bug)
  3. Run ruby -Itest test/template/template_test.rb -n test_default_external_works (using ruby-1.9.3p0, obviously)
  4. Tell me if it passes or fails
@HectorMalot
Copy link

Was able reproduce it on a mac (10.7.2)

without commenting:

caligula:actionpack [master *]$ ruby -I test test/template/template_test.rb -n test_default_external_works
Run options: -n test_default_external_works

# Running tests:

.

Finished tests in 0.020873s, 47.9088 tests/s, 95.8176 assertions/s.

1 tests, 2 assertions, 0 failures, 0 errors, 0 skips

With commenting:

caligula:actionpack [master]$ ruby -I test test/template/template_test.rb -n test_default_external_works
Run options: -n test_default_external_works

# Running tests:

E

Finished tests in 0.039100s, 25.5754 tests/s, 0.0000 assertions/s.

  1) Error:
test_default_external_works(TestERBTemplate):
ActionView::Template::Error: code converter not found (ISO-8859-1 to UTF-8)
    /Users/dennis/Development/Rails/rails/rails-gist-1344600/rails/actionpack/lib/action_view/template/handlers/erb.rb:83:in `encode!'
    /Users/dennis/Development/Rails/rails/rails-gist-1344600/rails/actionpack/lib/action_view/template/handlers/erb.rb:83:in `call'
    /Users/dennis/Development/Rails/rails/rails-gist-1344600/rails/actionpack/lib/action_view/template.rb:278:in `compile'
    /Users/dennis/Development/Rails/rails/rails-gist-1344600/rails/actionpack/lib/action_view/template.rb:215:in `compile!'
    /Users/dennis/Development/Rails/rails/rails-gist-1344600/rails/actionpack/lib/action_view/template.rb:168:in `block in render'
    /Users/dennis/Development/Rails/rails/rails-gist-1344600/rails/activesupport/lib/active_support/notifications.rb:121:in `instrument'
    /Users/dennis/Development/Rails/rails/rails-gist-1344600/rails/actionpack/lib/action_view/template.rb:167:in `render'
    test/template/template_test.rb:53:in `render'
    test/template/template_test.rb:135:in `block in test_default_external_works'
    test/template/template_test.rb:174:in `with_external_encoding'
    test/template/template_test.rb:133:in `test_default_external_works'
    /Users/dennis/.rvm/gems/ruby-1.9.3-p0@gist-1344600/gems/mocha-0.10.0/lib/mocha/integration/mini_test/version_230_to_251.rb:28:in `run'

1 tests, 0 assertions, 0 failures, 1 errors, 0 skips

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment