Gemcutter Rake Build Now Throws "Undefined Method 'Write' for #<Syck::Emitter:...." After Updating to Rubygems 1.5.0 on Ruby 1.9.2 on Windows

GemCutter rake build now throws undefined method 'write' for #Syck::Emitter:.... after updating to rubygems 1.5.0 on ruby 1.9.2 on Windows

Update: There are reports in #1239 that upgrading to either bundler 1.0.21 or 1.1 might fix the problem. (Thanks to forforf for the pointer!)

gem install bundler

This is a known bug (#1239) in bundler. Larsch's workaround of adding require 'psych' at the top of the Rakefile didn't help for my Rails project (for whatever reason -- it simply didn't change anything), but setting RUBYOPT='-rpsych' as a workaround, like so, solved the problem:

RUBYOPT='-rpsych' bundle install

(Thanks to Moro for pointing this out.)

It only seems to be needed for install and update. The application itself (i.e. calling rake etc., even with bundle exec) should continue to function without setting RUBYOPT.


For background, the reason why simply requiring the psych module makes a difference seems to be this: YAML automatically uses the (older) Syck library, unless Psych is loaded at the time YAML is required, in which case it uses Psych. This kind of implicit behavior, of course, causes a lot of trouble, including the problem we see here.

Gem dependency error in rails 2.3.4

This is happening because you installed RubyGems that is too new for your version of Rails. Either downgrade (and re-run update_rubygems) or upgrade Rails to 2.3.11.

bundle exec jekyll serve: cannot load such file

Here's how I solved it thanks to @choas' comment:

  1. Updated github-pages, jekyll and jekyll-feed gems by running gem install github-pages, gem install jekyll and gem install jekyll-feed. I had to do this step as a simple bundle update wasn't installing the latest version.
  2. Modify those gems in the Gemfile to the latest version.
  3. Run bundle update
  4. Finally run bundle exec jekyll serve

I am not sure that all those steps aren't redundant as I am not very familiar with Ruby/Github Pages/Jekyll but it did work.

bundle update fails : marshal data too short

Try to change from HTTP to HTTPS in your Gemfile:

Change:

source 'http://rubygems.org'

To:

source 'https://rubygems.org'

Acording this article from Hacker News, Rubygems.org was compromised.
More info: Marshal data too short error and https for rubygems.org in the Gemfile?



Related Topics



Leave a reply



Submit