stevo / excellent

XLS generation from html tables through XERB templates
17 stars 3 forks source link

erb_trim_mode error #2

Open EppO opened 15 years ago

EppO commented 15 years ago

when starting your fruit example app:

=> Booting Thin
=> Rails 2.3.4 application starting on http://0.0.0.0:3000
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/class/attribute_accessors.rb:37:in `erb_trim_mode=': can't modify frozen class/module (TypeError)
    from /home/eppo/git/excel/vendor/plugins/excellent/lib/excellent/xerb.rb:10
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
    from /home/eppo/git/excel/vendor/plugins/excellent/lib/excellent/template_handler.rb:1
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
    from /home/eppo/git/excel/vendor/plugins/excellent/lib/excellent.rb:2
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
    from /home/eppo/git/excel/vendor/plugins/excellent/init.rb:1:in `evaluate_init_rb'
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/plugin.rb:158:in `evaluate_init_rb'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/plugin.rb:154:in `evaluate_init_rb'
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/plugin.rb:48:in `load'
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/plugin/loader.rb:38:in `load_plugins'
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/plugin/loader.rb:37:in `each'
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/plugin/loader.rb:37:in `load_plugins'
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:369:in `load_plugins'
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:165:in `process'
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in `send'
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in `run'
    from /home/eppo/git/excel/config/environment.rb:9
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in'
    from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
    from /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/commands/server.rb:84
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from ./script/server:3

I commented the line:

# self.erb_trim_mode = '-'

and it's working fine without it (don't know what it does exactly)

ghost commented 15 years ago

Yes - It did work on one of previous rails versions :) I will upload patch for both this and correction in readme tommorow