0

has_many_polymorphsをインストールした直後

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

スクリプト/生成またはスクリプト/サーバーのようなsmthを実行しようとすると、次のエラーが発生し始めます

=> 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

それについて助けてくれてありがとう、

パベル

4

1 に答える 1

1

autoload.rbの行41をから変更してみてください

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

 open filename do |file|

少なくとも、アプリケーションが起動します。

KP

于 2009-08-07T10:09:22.150 に答える