我最近尝试制作一个新的rails项目并运行新的new_project'命令并在下面得到此错误。 有谁知道该怎么办?
/usr/local/Cellar/ruby/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.rc.3/lib/bundler/settings.rb:229:in { {1}}阻止在load_config' 来自/usr/local/Cellar/ruby/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.rc.3/lib/bundler/shared_helpers.rb:105:in {{1 }} load_config' 来自/usr/local/Cellar/ruby/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.rc.3/lib/bundler/settings.rb:13:in {{1 }}新' 来自/usr/local/Cellar/ruby/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.rc.3/lib/bundler.rb:198:in
scan': invalid byte sequence in US-ASCII (ArgumentError) from /usr/local/Cellar/ruby/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.rc.3/lib/bundler/settings.rb:229:in
报告' 来自/usr/local/Cellar/ruby/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.rc.3/lib/bundler/friendly_errors.rb:74:in {{1 }} LOG_ERROR' 来自/usr/local/Cellar/ruby/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.rc.3/lib/bundler/friendly_errors.rb:100:in {{1 }} with_friendly_errors' 来自/usr/local/Cellar/ruby/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.rc.3/exe/bundle:19:infilesystem_access' from /usr/local/Cellar/ruby/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.rc.3/lib/bundler/settings.rb:225:in
scan&# 39;:US-ASCII中的无效字节序列(ArgumentError) 来自/usr/local/Cellar/ruby/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.rc.3/lib/bundler/settings.rb:229:in {{1 }} filesystem_access' 来自/usr/local/Cellar/ruby/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.rc.3/lib/bundler/settings.rb:225:in {{1 }}初始化' 来自/usr/local/Cellar/ruby/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.rc.3/lib/bundler.rb:198:ininitialize' from /usr/local/Cellar/ruby/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.rc.3/lib/bundler.rb:198:in
设置' 来自/usr/local/Cellar/ruby/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.rc.3/lib/bundler/env.rb:28:in {{1 }} request_issue_report_for' 来自/usr/local/Cellar/ruby/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.rc.3/lib/bundler/friendly_errors.rb:40:in {{1在with_friendly_errors'中救援 来自/usr/local/Cellar/ruby/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.12.0.rc.3/lib/bundler/friendly_errors.rb:98:in {{1 }}'
答案 0 :(得分:1)
在line 229中,bundler尝试加载本地配置文件。看起来该文件包含非ascii字符(US-ASCII中的无效字节序列)。
要解决该问题,请打开您在主文件夹中~/.bundler/config
找到的捆绑器配置文件,然后删除无效字符。