views:

124

answers:

1

hi all,

immediately after has_many_polymorphs install with

ruby script/plugin install git://github.com/fauna/has_many_polymorphs.git

i start getting following error whenever i try to execute smth like script/generate or script/server

=> Rails 2.3.2 application starting on http://0.0.0.0:3000
/test/vendor/plugins/has_many_polymorphs/lib/has_many_polymorphs/autoload.rb:41:in `initialize': can't convert Hash into String (TypeError)
from /test/vendor/plugins/has_many_polymorphs/lib/has_many_polymorphs/autoload.rb:41:in `open'
from /test/vendor/plugins/has_many_polymorphs/lib/has_many_polymorphs/autoload.rb:41:in `autoload'
from /test/vendor/plugins/has_many_polymorphs/lib/has_many_polymorphs/autoload.rb:39:in `each'
from /test/vendor/plugins/has_many_polymorphs/lib/has_many_polymorphs/autoload.rb:39:in `autoload'
from /test/vendor/plugins/has_many_polymorphs/lib/has_many_polymorphs/autoload.rb:61:in `after_initialize'
from /home/pavel/.gem/ruby/1.8/gems/rails-2.3.2/lib/initializer.rb:177:in `process'
from /home/pavel/.gem/ruby/1.8/gems/rails-2.3.2/lib/initializer.rb:113:in `send'
from /home/pavel/.gem/ruby/1.8/gems/rails-2.3.2/lib/initializer.rb:113:in `run'
from /home/pavel/Desktop/www/webdev/simplecommunities/config/environment.rb:9
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /var/lib/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
from /var/lib/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /var/lib/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
from /home/pavel/.gem/ruby/1.8/gems/rails-2.3.2/lib/commands/server.rb:84
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from script/server:3

Thanks for any help on that,

Pavel

+1  A: 

Try to change the line 41 in autoload.rb from

  open(filename, :encoding=>"utf-8") do |file|

to

 open filename do |file|

At least the application now boots for me.

K-P

thanks, worked for me too
Pavel K.