[英]Ruby on Rails invalid byte sequence in UTF-8 (ArgumentError)
When I running command 当我运行命令
rails generate mongoid:config
or 要么
rails generate rspec:install
I am getting this error - match: invalid byte sequence in UTF-8 (ArgumentError)
我收到此错误-
match: invalid byte sequence in UTF-8 (ArgumentError)
I tried those gems: 我尝试过这些宝石:
gem 'rack-utf8_sanitizer'
gem "handle_invalid_percent_encoding_requests"
gem 'utf8-cleaner'
They do not help! 他们没有帮助! I am using macbook OSX 10.9 How can I fix it?
我正在使用Macbook OSX 10.9,该如何解决? I am using ruby 2.1.2 and I make app by rails new myapp and I have not change anything yet in the code.
我正在使用ruby 2.1.2,并通过rails new myapp创建应用程序,但代码中尚未更改任何内容。
I found what was the problem! 我发现了问题所在! It was a gem 'spring' which automatically adds to Gemfile when you run: rails new myapp.
它是一个gem“ spring”,运行时会自动添加到Gemfile中:rails new myapp。 To avoid this problem you need to run: rails new myapp --skip-spring
为了避免这个问题,您需要运行:rails new myapp --skip-spring
I found answer here: Rails Spring breaking generators 我在这里找到答案: Rails弹簧破碎发电机
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.