ruby script/plugin install git://github.com/fauna/has_many_polymorphs.git
每当我尝试执行像script / generate或script / server
这样的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
感谢您提供任何帮助,
帕维尔
答案 0 :(得分:1)
尝试从
更改autoload.rb中的第41行 open(filename, :encoding=>"utf-8") do |file|
到
open filename do |file|
至少应用程序现在为我启动了。
K-P