undefined class/module YAML::PrivateType - Error

P

Priya D.

Hi,

I have uploaded a new version of gem to the server, successfully. If i
install the gem from local, its successfully installed.

But I'm getting following error while installing the same gem from
remote server.

ERROR: While executing gem ... (ArgumentError)
undefined class/module YAML::privateType

Note:

I have included a method outside of any class/module. Is there any issue
with that?

Thanks,
Priya
 
B

Bernard Lambeau

[Note: parts of this message were removed to make it a legal post.]

I also observed this behavior recently. It seems that it is an
incompatibility between ruby versions (1.8.7 vs. 1.9.2) and rubygems 1.5.0.

I've already submitted a ticket in rubygems's bug tracker:
http://rubyforge.org/tracker/index.php?func=detail&aid=28906&group_id=126&atid=575

blambeau

Hi,

I have uploaded a new version of gem to the server, successfully. If i
install the gem from local, its successfully installed.

But I'm getting following error while installing the same gem from
remote server.

ERROR: While executing gem ... (ArgumentError)
undefined class/module YAML::privateType

Note:

I have included a method outside of any class/module. Is there any issue
with that?

Thanks,
Priya


--
PhD Student, Computer Science Department, EPL/INGI, UCLouvain, Belgium
Mail: (e-mail address removed)
Mobile: +32 477 24 58 61
Blog: http://revision-zero.org/
Code: http://github.com/blambeau/
Follow: http://twitter.com/blambeau/
 
B

Bernard Lambeau

[Note: parts of this message were removed to make it a legal post.]

Not yet and it seems that many people are currently observing similar
behavior:
http://help.rubygems.org/discussion...ruby-192-do-not-install-properly-with-150-187

I've put ruby-core members in copy, to draw their attention on the problem.
I don't know how I can make better...

blambeau

Have you got any response or do you found any solution to the same?


--
PhD Student, Computer Science Department, EPL/INGI, UCLouvain, Belgium
Mail: (e-mail address removed)
Mobile: +32 477 24 58 61
Blog: http://revision-zero.org/
Code: http://github.com/blambeau/
Follow: http://twitter.com/blambeau/
 
L

Luis Lavena

Not yet and=A0it seems that many people are currently observing similar
behavior:=A0http://help.rubygems.org/discussions/problems/483-gems-built-= with-rubygems-150-ruby-192-do-not-install-properly-with-150-187
I've put ruby-core members in copy, to draw their attention on the proble= m.
I don't know how I can make better...

This has already been fixed in RubyGems:
https://github.com/rubygems/rubygems/commit/6a896f356ef325d0357051fa962b6e3=
a835c04d2

http://help.rubygems.org is not meant to report bugs, is for support
around rubygems.org itself. For that is RubyGems bug tracker:

http://rubyforge.org/projects/rubygems

--=20
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exup=E9ry
 
K

Kristian Mandrup

I finally figured out that removeing site_ruby from the equation fixed
it :)

$ sudo rm -rf /Users/kristianconsult/.rvm/rubies/ruby-1.9.2-p136/lib/
ruby/site_ruby
 
M

Ming

This has already been fixed in RubyGems:https://github.com/rubygems/rubygems/commit/6a896f356ef325d0357051fa9...

http://help.rubygems.orgis not meant to report bugs, is for support
around rubygems.org itself. For that is RubyGems bug tracker:

http://rubyforge.org/projects/rubygems

--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

Has this really been fixed? I see the commit and checked the source
for 1.5.3, so the code fix applies to my setup, but I'm seeing the
error trying to install the (Kristian Mandrup's) cream gem.

Kristian's solution (for his own problem) of rm -rf the site_ruby
doesn't work for me.

"gem install cream"
ERROR: While executing gem ... (ArgumentError)
undefined class/module YAML::privateType
gem -v
1.5.3
ruby -v (under rvm)
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]
 
R

Ryan Davis

Has this really been fixed? I see the commit and checked the source
for 1.5.3, so the code fix applies to my setup, but I'm seeing the
error trying to install the (Kristian Mandrup's) cream gem.

Kristian's solution (for his own problem) of rm -rf the site_ruby
doesn't work for me.

"gem install cream"
ERROR: While executing gem ... (ArgumentError)
undefined class/module YAML::privateType
gem -v
1.5.3
ruby -v (under rvm)
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]

It installs for me (not under rvm):

10004 % rm -rf xxxx
10005 % gem -v
1.5.3
10006 % gem install -i xxxx cream --no-ri --no-rdoc
Fetching: rack-1.2.1.gem (100%)
Fetching: warden-1.0.3.gem (100%)
Fetching: bcrypt-ruby-2.1.4.gem (100%)
Building native extensions. This could take a while...
Fetching: devise-1.1.7.gem (100%)
Fetching: activesupport-3.0.5.gem (100%)
Fetching: require_all-1.2.0.gem (100%)
Fetching: mocha-0.9.12.gem (100%)
Fetching: sugar-high-0.3.5.gem (100%)
Fetching: builder-2.1.2.gem (100%)
Fetching: i18n-0.5.0.gem (100%)
Fetching: activemodel-3.0.5.gem (100%)
Fetching: rack-test-0.5.7.gem (100%)
Fetching: rack-mount-0.6.13.gem (100%)
Fetching: tzinfo-0.3.24.gem (100%)
Fetching: abstract-1.0.0.gem (100%)
Fetching: erubis-2.6.6.gem (100%)
Fetching: actionpack-3.0.5.gem (100%)
Fetching: arel-2.0.9.gem (100%)
Fetching: activerecord-3.0.5.gem (100%)
Fetching: activeresource-3.0.5.gem (100%)
Fetching: mime-types-1.16.gem (100%)
Fetching: polyglot-0.3.1.gem (100%)
Fetching: treetop-1.4.9.gem (100%)
Fetching: mail-2.2.15.gem (100%)
Fetching: actionmailer-3.0.5.gem (100%)
Fetching: rake-0.8.7.gem (100%)
Fetching: thor-0.14.6.gem (100%)
Fetching: railties-3.0.5.gem (100%)
Fetching: bundler-1.0.10.gem (100%)
Fetching: rails-3.0.5.gem (100%)
Fetching: r3_plugin_toolbox-0.4.1.gem (100%)
Fetching: rspec-core-2.5.1.gem (100%)
Fetching: diff-lcs-1.1.2.gem (100%)
Fetching: rspec-expectations-2.5.0.gem (100%)
Fetching: rspec-mocks-2.5.0.gem (100%)
Fetching: rspec-2.5.0.gem (100%)
Fetching: migration_assist-0.1.9.gem (100%)
Fetching: rails3_assist-0.3.7.gem (100%)
Fetching: rails3_artifactor-0.3.2.gem (100%)
Fetching: colorize-0.5.8.gem (100%)
Fetching: thrift-0.5.0.gem (100%)
Building native extensions. This could take a while...
Fetching: thrift_client-0.6.0.gem (100%)
Fetching: scribe-0.2.2.gem (100%)
Fetching: log4r-color-1.2.gem (100%)
Fetching: logging_assist-0.2.1.gem (100%)
Fetching: devise-links-0.2.2.gem (100%)
Fetching: cancan-1.5.1.gem (100%)
Fetching: cancan-rest-links-0.2.2.gem (100%)
Fetching: cancan-permits-0.3.10.gem (100%)
Fetching: cream-0.8.9.2.gem (100%)
Successfully installed rack-1.2.1
Successfully installed warden-1.0.3
Successfully installed bcrypt-ruby-2.1.4
Successfully installed devise-1.1.7
Successfully installed activesupport-3.0.5
Successfully installed require_all-1.2.0
Successfully installed mocha-0.9.12
Successfully installed sugar-high-0.3.5
Successfully installed builder-2.1.2
Successfully installed i18n-0.5.0
Successfully installed activemodel-3.0.5
Successfully installed rack-test-0.5.7
Successfully installed rack-mount-0.6.13
Successfully installed tzinfo-0.3.24
Successfully installed abstract-1.0.0
Successfully installed erubis-2.6.6
Successfully installed actionpack-3.0.5
Successfully installed arel-2.0.9
Successfully installed activerecord-3.0.5
Successfully installed activeresource-3.0.5
Successfully installed mime-types-1.16
Successfully installed polyglot-0.3.1
Successfully installed treetop-1.4.9
Successfully installed mail-2.2.15
Successfully installed actionmailer-3.0.5
Successfully installed rake-0.8.7
Successfully installed thor-0.14.6
Successfully installed railties-3.0.5
Successfully installed bundler-1.0.10
Successfully installed rails-3.0.5
Successfully installed r3_plugin_toolbox-0.4.1
Successfully installed rspec-core-2.5.1
Successfully installed diff-lcs-1.1.2
Successfully installed rspec-expectations-2.5.0
Successfully installed rspec-mocks-2.5.0
Successfully installed rspec-2.5.0
Successfully installed migration_assist-0.1.9
Successfully installed rails3_assist-0.3.7
Successfully installed rails3_artifactor-0.3.2
Successfully installed colorize-0.5.8
Successfully installed thrift-0.5.0
Successfully installed thrift_client-0.6.0
Successfully installed scribe-0.2.2
Successfully installed log4r-color-1.2
Successfully installed logging_assist-0.2.1
Successfully installed devise-links-0.2.2
Successfully installed cancan-1.5.1
Successfully installed cancan-rest-links-0.2.2
Successfully installed cancan-permits-0.3.10
Successfully installed cream-0.8.9.2
50 gems installed
10007 %
 
M

Ming

Has this really been fixed?  I see the commit and checked the source
for 1.5.3, so the code fix applies to my setup, but I'm seeing the
error trying to install the (Kristian Mandrup's) cream gem.
Kristian's solution (for his own problem) of rm -rf the site_ruby
doesn't work for me.
"gem install cream"
ERROR:  While executing gem ... (ArgumentError)
   undefined class/module YAML::privateType
gem -v
1.5.3
ruby -v (under rvm)
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]

It installs for me (not under rvm):

10004 % rm -rf xxxx
10005 % gem -v
1.5.3
10006 % gem install -i xxxx cream --no-ri --no-rdoc
Fetching: rack-1.2.1.gem (100%)
snipped

Ryan,

Just to confirm, is your successful install above done with ruby
1.9.2? If so, I'll have to look into rvm as the source of the
problem.

(I installed cream with ruby 1.8.7 under rvm just fine.)

Thanks,
Ming
 
M

Marcelo Giorgi

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 ?

BTW: By using other rubygems version (such us 1.5.x) I've got the same
issue. But, If I use Rubygems 1.3.7 I've got a different issue:

$ rake install
(in /home/marcelo/workspace/roles_mongoid)
WARNING: no rubyforge_project specified
Successfully built RubyGem
Name: roles_mongoid
Version: 0.4.5
File: roles_mongoid-0.4.5.gem
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::Exception)
ruby_code case not handled: Syck::privateType

Any help would be highly appreciated :)
 
R

Ryan Davis

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:
=20
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:i=
n
/home/marcelo/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:1010:i=
n
`sh'
=20
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=3Dxxx GEM_PATH=3Dxxx 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 (>=3D 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.=
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top