ruby 魔法编码不起作用
我有一个 Rails 应用程序,并且不断收到此错误
/srv/projects/app/controllers/application_controller.rb:174: invalid multibyte char (US-ASCII) /srv/projects/app/controllers/application_controller.rb:174: invalid multibyte char (US-ASCII) /srv/projects/app/controllers/application_controller.rb:174: syntax error, unexpected $end, expecting ')' ...e_title = h("#{project_name} — #{name || translate_locatio... ... ^
,修复方法应该是 这里但是当我在应用程序控制器顶部添加该行时我仍然收到错误...我什至重新启动了apache
这是我的应用程序控制器
# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.
# encoding: utf-8
class ApplicationController < ActionController::Base
# encoding: utf-8
I have a rails application and i keep getting this error
/srv/projects/app/controllers/application_controller.rb:174: invalid multibyte char (US-ASCII) /srv/projects/app/controllers/application_controller.rb:174: invalid multibyte char (US-ASCII) /srv/projects/app/controllers/application_controller.rb:174: syntax error, unexpected $end, expecting ')' ...e_title = h("#{project_name} — #{name || translate_locatio... ... ^
and the fix should be here but when i added the line on top of my application controller i still get the error...i even restarted apache
Here is my application controller
# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.
# encoding: utf-8
class ApplicationController < ActionController::Base
# encoding: utf-8
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

发布评论
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
编码注释必须先于文件顶部 - 包括其他注释(如果有的话,shebang 除外)。
The encoding comment must be on top of the file before anything else - including other comments (except the shebang if you have one).