When attempting to install Rails gems with bundle install
I kept getting an error "control characters are not allowed at line 1 column 1" when bundler tried to gem install
some gems, like Nokogiri.
$ gem install nokogiri -v 1.6.6.2
Fetching: mini_portile-0.6.2.gem (100%)
Successfully installed mini_portile-0.6.2
Fetching: nokogiri-1.6.6.2.gem (100%)
ERROR: Error installing nokogiri:
invalid gem: package is corrupt, exception while verifying: (<unknown>): control characters are not allowed at line 1 column 1 (Psych::SyntaxError) in /var/www/.rvm/gems/ext-rbx-2.5.2@rails2/cache/nokogiri-1.6.6.2.gem
Here are some similar questions:
(I think my question is not a duplicate because in this case the error occurred when using bundle install, while in the case above it happened when deploying with capistrano, but I admit this question is very similar.)
Why am I getting a Psych error when trying to deploy with capistrano?
psych.rb error when deploying with Capistrano 'mapping not allowed in this context'