From: Ryan Davis Date: 2011-03-06T13:25:57+09:00 Subject: Re: undefined class/module YAML::PrivateType - Error On Mar 5, 2011, at 14:12 , Marcelo Giorgi wrote: > I got a similar issue while installing roles_mongoid on my system > (Ubuntu 10.04 (32b), using rvm, ruby: 1.9.2-p180, rubygems 1.6.1). So > the exception is the same, in fact I tried to install it by cloning the > gem repo and got the same results: > > roles_mongoid$ rake install --trace > (in /home/marcelo/workspace/roles_mongoid) > ** Invoke install (first_time) > ** Invoke build (first_time) > ** Execute build > Successfully built RubyGem > Name: roles_mongoid > Version: 0.4.5 > File: roles_mongoid-0.4.5.gem > ** Execute install > Executing "ruby -S gem install ./pkg/roles_mongoid-0.4.5.gem": > ruby -S gem install ./pkg/roles_mongoid-0.4.5.gem > ERROR: While executing gem ... (ArgumentError) > undefined class/module YAML::PrivateType > rake aborted! > Command failed with status (1): [ruby -S gem install > ./pkg/roles_mongoid-0....] > /home/marcelo/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:995:in > `block in sh' > /home/marcelo/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:1010:in > `call' > /home/marcelo/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:1010:in > `sh' > > Does anyone faced a similar problem or have any idea about this issue ? Huh... I don't get that error at all! I get something much much better: 10020 % GEM_HOME=xxx GEM_PATH=xxx rake19 install -t (in /Users/ryan/roles_mongoid-0.4.5) ** Invoke install (first_time) ** Invoke build (first_time) ** Execute build Successfully built RubyGem Name: roles_mongoid Version: 0.4.5 File: roles_mongoid-0.4.5.gem ** Execute install Executing "ruby -S gem install ./pkg/roles_mongoid-0.4.5.gem": ruby -S gem install ./pkg/roles_mongoid-0.4.5.gem ERROR: While executing gem ... (Gem::DependencyError) Unable to resolve dependencies: rails3_assist requires sugar-high (~> 0.3.0); rails3_artifactor requires sugar-high (~> 0.3.0); roles_mongoid requires sugar-high (>= 0.3.5), sugar-high (~> 0.3.5); rails_assist requires sugar-high (~> 0.4.0), sugar-high (~> 0.4.0); logging_assist requires sugar-high (~> 0.4.0); rails_artifactor requires sugar-high (~> 0.4.0); roles_generic requires sugar-high (~> 0.4.0), sugar-high (~> 0.4.0) Which is about seven levels of awesome in my book! In your case... can you do the following for me? % gem spec pkg/roles_mongoid-0.4.5.gem | grep PrivateType and if that doesn't match at all try this: % rm -rf ~/.gem/specs/* But really at this point I'm just guessing.