简体   繁体   English

Rails中UTF-8中的无效字节序列(ArgumentError)

[英]Rails invalid byte sequence in UTF-8 (ArgumentError)

All i am doing is rails s from the code downloaded from a server, which is running without a problem, but it is stubborn to go past this error 我所做的只是从服务器下载的代码中的rails s ,该服务器正在运行,没有任何问题,但是克服此错误很固执

rails s
=> Booting Thin
=> Rails 4.0.2 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/usr/share/rvm/gems/ruby-2.1.4/gems/rack-1.5.2/lib/rack/builder.rb:36:in `[]': invalid byte sequence in UTF-8 (ArgumentError)
    from /usr/share/rvm/gems/ruby-2.1.4/gems/rack-1.5.2/lib/rack/builder.rb:36:in `parse_file'
    from /usr/share/rvm/gems/ruby-2.1.4/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
    from /usr/share/rvm/gems/ruby-2.1.4/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
    from /usr/share/rvm/gems/ruby-2.1.4/gems/railties-4.0.2/lib/rails/commands/server.rb:48:in `app'
    from /usr/share/rvm/gems/ruby-2.1.4/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
    from /usr/share/rvm/gems/ruby-2.1.4/gems/railties-4.0.2/lib/rails/commands/server.rb:75:in `start'
    from /usr/share/rvm/gems/ruby-2.1.4/gems/railties-4.0.2/lib/rails/commands.rb:76:in `block in <top (required)>'
    from /usr/share/rvm/gems/ruby-2.1.4/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap'
    from /usr/share/rvm/gems/ruby-2.1.4/gems/railties-4.0.2/lib/rails/commands.rb:71:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'

any little help would be a life saving tip for me, banging my head for couple of days with in-numerous installations and configurations. 任何小小的帮助对我来说都是一条救生的秘诀,通过无数的安装和配置使我的头撞了几天。

Thanks in advance. 提前致谢。

gem 'rack-utf8_sanitizer'使用gem 'rack-utf8_sanitizer'gem "handle_invalid_percent_encoding_requests"并运行bundle

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Rails和Heroku:方法中的ArgumentError(UTF-8中无效的字节序列) - Rails and Heroku : ArgumentError (invalid byte sequence in UTF-8) in method UTF-8中的Ruby on Rails无效字节序列(ArgumentError) - Ruby on Rails invalid byte sequence in UTF-8 (ArgumentError) Rails控制台UTF-8中的无效字节序列(ArgumentError) - Rails console invalid byte sequence in UTF-8 (ArgumentError) Ruby on Rails 问题:在“匹配?”中:UTF-8(ArgumentError)中的字节序列无效? - Ruby on Rails problem: in `match?': invalid byte sequence in UTF-8 (ArgumentError)? ArgumentError:UTF-8 中的字节序列无效 - ArgumentError: invalid byte sequence in UTF-8 UTF-8 中的 ArgumentError 无效字节序列 - ArgumentError invalid byte sequence in UTF-8 Rails 应用程序:连接到生产数据库时出现 ArgumentError(UTF-8 中的字节序列无效) - Rails app: ArgumentError (invalid byte sequence in UTF-8) when connecting to production database Ruby&#39;to_json&#39;抛出ArgumentError:UTF-8中无效的字节序列 - Ruby 'to_json' throws ArgumentError: invalid byte sequence in UTF-8 Ruby / Nokogiri网站抓取-UTF-8中的无效字节序列(ArgumentError) - Ruby/Nokogiri site scraping - invalid byte sequence in UTF-8 (ArgumentError) Ruby 2.1.5-ArgumentError:UTF-8中的无效字节序列 - Ruby 2.1.5 - ArgumentError: invalid byte sequence in UTF-8
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM