problem with gem

M

Mohammad Khan

Hello,

I am trying to make a gem package for one of my library that I am
going to make avaiable soon. Problem is, I can successfully install my
gem on the machine where I build the gem. But if I copy that gem to
another machine and try to install it I get

[root@ruby-agi download]# gem install ruby-agi-0.0.3.gem
Attempting local installation of 'ruby-agi-0.0.3.gem'
ERROR: Error installing gem ruby-agi-0.0.3.gem[.gem]: parse error on
line 0, col 31: `!ruby/object:Gem::Specification '

on both build machine and client machine I have gem-0.8.11
I also gave a try by deleting source_cache file, but no luck.


I am sure, I havn't provide enough information to identify the
problem. What else I should provide, please suggest. I am new at gem
packaging. Your help would be greatly appreciated.

Thanks,
Mohammad Khan
 
J

Jim Weirich

Mohammad said:
Hello,

I am trying to make a gem package for one of my library that I am
going to make avaiable soon. Problem is, I can successfully install my
gem on the machine where I build the gem. But if I copy that gem to
another machine and try to install it I get

[root@ruby-agi download]# gem install ruby-agi-0.0.3.gem
Attempting local installation of 'ruby-agi-0.0.3.gem'
ERROR: Error installing gem ruby-agi-0.0.3.gem[.gem]: parse error on
line 0, col 31: `!ruby/object:Gem::Specification '

Sounds like you built the gem on a Ruby 1.8.3 system and are trying to
install it on a Ruby 1.8.2 system. Version 1.8.3 has a backwards
compatibility bug in the Yaml code such that the yaml produced on 1.8.3
cannot be read on earlier systems.

Fortunately, I've heard rumours that 1.8.4 (out real soon now) will
correct that bug.
 
M

Mohammad Khan

Hi Jim,

Thanks a lot for your reply.
Yes, ruby version is the issue at my end.

I am going to add the following line in my spec file
spec.required_ruby_version =3D '>=3D 1.8.3'


Thanks again,
Mohammad Khan



Mohammad said:
Hello,

I am trying to make a gem package for one of my library that I am
going to make avaiable soon. Problem is, I can successfully install my
gem on the machine where I build the gem. But if I copy that gem to
another machine and try to install it I get

[root@ruby-agi download]# gem install ruby-agi-0.0.3.gem
Attempting local installation of 'ruby-agi-0.0.3.gem'
ERROR: Error installing gem ruby-agi-0.0.3.gem[.gem]: parse error on
line 0, col 31: `!ruby/object:Gem::Specification '

Sounds like you built the gem on a Ruby 1.8.3 system and are trying to
install it on a Ruby 1.8.2 system. Version 1.8.3 has a backwards
compatibility bug in the Yaml code such that the yaml produced on 1.8.3
cannot be read on earlier systems.

Fortunately, I've heard rumours that 1.8.4 (out real soon now) will
correct that bug.
 

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,774
Messages
2,569,598
Members
45,161
Latest member
GertrudeMa
Top