解决使用Rails中使用中文时出现"Your template was not saved as valid UTF-8"的问题
摘要:我使用NetBeans 7.1.2作为IDE,但用它编辑的erb文件中存在中文的话,访问会出现"Your template was not saved as valid UTF-8"提示。需要在NetBeans中做如下设置:1. 找到你的Netbeans安装目录下的etc文件夹,如C:\Program Files\NetBeans 7.1.2\etc2. 用记事本打开netbeans.conf3. 找到netbeans_default_options这一句4. 在最后面加上一个空格,再加入-J-Dfile.encoding=UTF-8然后重启NetBeans。
阅读全文
posted @ 2012-09-13 18:43
浙公网安备 33010602011771号