今天我重新安装了我的Mac,我也不得不重新安装导轨等.现在我已经正确设置了所有内容(至少我希望如此),但我一直遇到一个非常烦人的错误.
- $bundle install
- Fetching gem Metadata from https://rubygems.org/..........
- Fetching gem Metadata from https://rubygems.org/..
- Resolving dependencies...
- ArgumentError: invalid byte sequence in UTF-8
- An error occurred while installing rake (10.1.0),and Bundler cannot continue.
- Make sure that `gem install rake -v '10.1.0'` succeeds before bundling.
现在我认为重新安装“rake”可以解决问题,但事实并非如此.我已经按照这个blog post,但它也没有解决我的问题,因为“/etc/paths.d”文件夹中没有文件.
- $ls -a /etc/paths.d
- . ..
所以我试图按照其他博文中的建议更改我的.bashrc文件.但这并没有成功.
- # .bashrc file
- PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
- # Make sure the UTF-8 locale is set correctly
- export LANG="en_US.UTF-8"
- export LC_ALL="en_US.UTF-8"
我也尝试删除并重新安装rails,但这并没有解决问题.所以你们有什么建议在哪里看?
更新
解决方法
您应该首先更新Rubygems:
- gem update --system
然后更新Bundler:
- gem install bundler