解决netbeans下新建model出现 invalid multibyte character 的错误

IDE:netbeans 6.8

rais:2.3.5

在netbeans6.8下新建model会出现以下错误:

/usr/lib/ruby/gems/1.9.1/gems/actionmailer-2.3.2/lib/action_mailer/vendor/tmail-1.2.3/tmail/utils.rb:117:in `': invalid multibyte character (ArgumentError)

from /usr/lib/ruby/gems/1.9.1/gems/actionmailer-2.3.2/lib/action_mailer/vendor/tmail-1.2.3/tmail/utils.rb:110:in `'

from /usr/lib/ruby/gems/1.9.1/gems/actionmailer-2.3.2/lib/action_mailer/vendor/tmail-1.2.3/tmail/utils.rb:53:in `'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `block in require'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'

from /usr/lib/ruby/gems/1.9.1/gems/actionmailer-2.3.2/lib/action_mailer/vendor/tmail-1.2.3/tmail/interface.rb:36:in `'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `block in require'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'

from /usr/lib/ruby/gems/1.9.1/gems/actionmailer-2.3.2/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb:34:in `'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `block in require'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'

from /usr/lib/ruby/gems/1.9.1/gems/actionmailer-2.3.2/lib/action_mailer/vendor/tmail-1.2.3/tmail.rb:2:in `'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `block in require'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'

from /usr/lib/ruby/gems/1.9.1/gems/actionmailer-2.3.2/lib/action_mailer/vendor/tmail.rb:13:in `'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `block in require'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'

from /usr/lib/ruby/gems/1.9.1/gems/actionmailer-2.3.2/lib/action_mailer.rb:62:in `'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `block in require'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'

from /usr/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/initializer.rb:266:in `block in require_frameworks'

from /usr/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/initializer.rb:266:in `each'

from /usr/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/initializer.rb:266:in `require_frameworks'

from /usr/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/initializer.rb:134:in `process'

from /usr/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/initializer.rb:113:in `run'

from /home/jyro/Work/projects/gisaid/config/environment.rb:12:in `'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `block in require'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'

from /usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'

from /usr/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/commands/server.rb:84:in `'

from script/server:3:in `require'

from script/server:3:in `
'

在网上查了一下,解决方法是修改 netbeans安装目录/etc/中的netbeans.conf 文件

在 netbeans_default_options 里加上 [b]-J-Druby.no.kcode=true[/b],重启

netbeans后新建成功。

这个问题貌似是netbeans的bug。。。

你可能感兴趣的:(ruby)