tag:help.rubygems.org,2010-01-19:/discussions/problems/172-cant-install-gems-whose-platform-is-universal-dotnetRubyGems.org: Discussion 2014-08-13T17:40:05Ztag:help.rubygems.org,2010-01-19:Comment/17385182010-05-20T16:10:50Z2010-05-20T16:10:52ZCan't install gems whose platform is universal-dotnet<div><p>Using IronRuby 1.0, I can <code>ir -S gem search -r
iron-term-ansicolor</code>, and see that it is published. However,
when I try to <code>ir -S gem install iron-term-ansicolor</code>, I
get:</p>
<p>ERROR: Could not find a valid gem 'iron-term-ansicolor' (>=
0) in any repository</p>
<p>Platform support for IronRuby was added in RubyGems 1.3.7. Is it
possible that RubyGems.org is running an older version of RubyGems
that does not recognize 'universal-dotnet' as a platform, and thus
doesn't find the gem to serve up?</p></div>Will Greentag:help.rubygems.org,2010-01-19:Comment/17385182010-05-20T18:22:27Z2010-05-20T18:22:27ZCan't install gems whose platform is universal-dotnet<div><p>What is your platform? <code>gem env</code> will say.</p></div>Eric Hodeltag:help.rubygems.org,2010-01-19:Comment/17385182010-05-20T18:28:57Z2010-05-20T18:28:57ZCan't install gems whose platform is universal-dotnet<div><ul>
<li>RUBYGEMS PLATFORMS:
<ul>
<li>ruby</li>
<li>universal-dotnet</li>
<li>universal-dotnet-2.0</li>
</ul>
</li>
</ul>
<p>Does the order matter?</p>
<p>-- Will Green<br>
<a href="http://hotgazpacho.org/">http://hotgazpacho.org/</a></p></div>Will Greentag:help.rubygems.org,2010-01-19:Comment/17385182010-05-24T17:17:00Z2010-05-24T17:18:24ZCan't install gems whose platform is universal-dotnet<div><p>Pretty sure that this is is because RubyGems.org is not running
RubyGems 1.3.7 (as confirmed by Nick Quaranto over Twitter:
<a href="http://twitter.com/qrush/status/14388448710">http://twitter.com/qrush/status/14388448710</a>),
where platform support for IronRuby was introduced.</p></div>Will Greentag:help.rubygems.org,2010-01-19:Comment/17385182010-05-24T21:19:59Z2010-05-24T21:19:59ZCan't install gems whose platform is universal-dotnet<div><p>The platform support is only required on the ironruby side of
things, not on the server.</p>
<p>As far as the server cares platforms are just a string.</p>
<p>I'm unable to reproduce your problem:</p>
<p>$ gem install iron-term-ansicolor --platform universal-dotnet -i
~/tmp/gems Successfully installed term-ansicolor-1.0.5<br>
Successfully installed
iron-term-ansicolor-0.0.5-universal-dotnet<br>
2 gems installed<br>
Installing ri documentation for term-ansicolor-1.0.5...<br>
Installing ri documentation for
iron-term-ansicolor-0.0.5-universal-dotnet...<br>
Installing RDoc documentation for term-ansicolor-1.0.5...<br>
Installing RDoc documentation for
iron-term-ansicolor-0.0.5-universal-dotnet...</p>
<p>$ gem install iron-term-ansicolor --platform
universal-dotnet-2.0 -i ~/tmp/gems Successfully installed
term-ansicolor-1.0.5<br>
Successfully installed
iron-term-ansicolor-0.0.5-universal-dotnet<br>
2 gems installed<br>
Installing ri documentation for term-ansicolor-1.0.5...<br>
Installing ri documentation for
iron-term-ansicolor-0.0.5-universal-dotnet...<br>
Installing RDoc documentation for term-ansicolor-1.0.5...<br>
Installing RDoc documentation for
iron-term-ansicolor-0.0.5-universal-dotnet...</p>
<p>PS:</p>
<p>universal-dotnet is automatically implied from
universal-dotnet-2.0 so listing both is not needed (see
Gem::Platform#===). You can see this based on the platforms I
installed with above. Can you file a bug against ironruby for
this?</p></div>Eric Hodeltag:help.rubygems.org,2010-01-19:Comment/17385182010-05-25T06:55:28Z2010-05-25T06:55:31ZCan't install gems whose platform is universal-dotnet<div><p>I think the problem lies in the marshalling and unmarshalling of
the specification. When it is unmarshalled, @original_platform is
set to 'universal-dotnet', but @platform is set to
'universal-unknown'.</p>
<p>Since the Spec is being downloaded from the rubgygems.org
server, isn't the server responsible for properly marshalling the
spec to be sent across the wire? I think it is, and if rubygems.org
is not running RubyGems 1.3.7, then it would not know how to
properly marshal Gem::Platform.new('universal-dotnet'), and would
instead marshal it as 'universal-unknown'.</p>
<p>Also, the install command calls Gem::Platform::match (which uses
==, not ===).</p></div>Will Greentag:help.rubygems.org,2010-01-19:Comment/17385182010-05-25T16:14:46Z2010-05-25T16:14:46ZCan't install gems whose platform is universal-dotnet<div><p>I don't think the server has that much code in it as the
platform is correct in the specs file:</p>
<p>["iron-term-ansicolor", #<Gem::Version "0.0.5">,
"universal-dotnet"]</p>
<p>And in the remote gemspec itself:</p>
<p>$ gem spec --platform universal-dotnet -r iron-term-ansicolor |
head --- !ruby/object:Gem::Specification name:
iron-term-ansicolor<br>
version: !ruby/object:Gem::Version<br>
hash: 21 segments: - 0 - 0 - 5 version: 0.0.5 platform:
universal-dotnet</p>
<p>If I'm able to fetch and install this gem with --platform I
don't think anything is broken or incorrect on the server side.</p>
<p>::match calls =~ which is an alias of ===.</p></div>Eric Hodeltag:help.rubygems.org,2010-01-19:Comment/17385182010-05-25T16:33:25Z2010-05-25T16:33:25ZCan't install gems whose platform is universal-dotnet<div><p>So, maybe it is an issue with RubyGems itself?</p>
<p>When it unmarshals the spec during the execution of the install
command, the<br>
@platform variable gets set to 'universal-unknown', while the
@original_platform gets set to the correct 'universal-dotnet'</p>
<p>-- Will Green<br>
<a href="http://hotgazpacho.org/">http://hotgazpacho.org/</a></p>
<p>On Tue, May 25, 2010 at 12:16 PM, drbrain <<br>
<a href=
"mailto:tender+d71a4516c6f0402e33f11408b66c1c82dbad5bd96@tenderapp.com">
tender+d71a4516c6f0402e33f11408b66c1c82dbad5bd96@tenderapp.com</a><<a href="mailto:tender%2Bd71a4516c6f0402e33f11408b66c1c82dbad5bd96@tenderapp.com">tender%2Bd71a4516c6f0402e33f11408b66c1c82dbad5bd96@tenderapp.com</a>><br></p>
<blockquote>
<p>wrote:</p>
<p>I don't think the server has that much code in it as the
platform is correct in the specs file:</p>
</blockquote></div>Will Greentag:help.rubygems.org,2010-01-19:Comment/17385182010-06-01T14:54:11Z2010-06-01T14:54:12ZCan't install gems whose platform is universal-dotnet<div><p>When running the command that you listed in you post on 05/24/10
@ 4:19. I do not get the same output. This is what I received from
MRI 1.8.7 w/ Rubygems 1.3.7:<br>
G:>gem install iron-term-ansicolor --platform
universal-dotnet<br>
Successfully installed
iron-term-ansicolor-0.0.5-universal-unknown<br>
1 gem installed<br>
Installing ri documentation for
iron-term-ansicolor-0.0.5-universal-unknown...<br>
Installing RDoc documentation for
iron-term-ansicolor-0.0.5-universal-unknown...</p>
<p>It would seem that the my platform is changed from
universal-dotnet to universal-unknown. While when executing the
same gem install for platform universal-dotnet-2.0 I received an
error stating that the gem could not gem found. This is not what
your post is showing. So is this an issue with the MRI also?</p></div>Thedric Walkertag:help.rubygems.org,2010-01-19:Comment/17385182010-06-01T18:07:41Z2010-06-01T18:07:41ZCan't install gems whose platform is universal-dotnet<div><p>Right, which would lend credence to my assertion that this is
not a Ruby<br>
implementation issue, but rather a issue with the Marshalling of
the<br>
Gem::Specification objects, which instantiate Gem::Platform
objects. If the<br>
server is not running 1.3.7 (which includes platform support for
IronRuby),<br>
then the instantiated Gem::Platform objects will not know what to
do with<br>
the string 'dotnet', and translate it to 'unknown'.</p>
<p>-- Will Green<br>
<a href="http://hotgazpacho.org/">http://hotgazpacho.org/</a></p></div>Will Greentag:help.rubygems.org,2010-01-19:Comment/17385182010-06-04T03:28:31Z2010-06-04T03:28:31ZCan't install gems whose platform is universal-dotnet<div><p>As of last night we're on rubygems 1.3.7 on the server side. Any
luck with this?</p></div>Nick Quarantotag:help.rubygems.org,2010-01-19:Comment/17385182010-06-04T20:31:22Z2010-06-04T20:31:26ZCan't install gems whose platform is universal-dotnet<div><p>Good news now the different versions are consistent. Bad News:
they all say: ERROR: Could not find a valid gem
'iron-term-ansicolor' (>=0) in any repository, but performing a
remote search locates the gem.</p></div>Thedric Walkertag:help.rubygems.org,2010-01-19:Comment/17385182010-06-22T19:09:50Z2010-06-22T19:09:50ZCan't install gems whose platform is universal-dotnet<div><p>Closer:</p>
<p>C:\Users\will.green>gem search -r iron-term-ansicolor</p>
<p><strong><em>REMOTE GEMS</em></strong></p>
<p>iron-term-ansicolor (0.0.5 universal-dotnet
universal-dotnet)</p>
<p>C:\Users\will.green>gem env<br>
RubyGems Environment:<br>
- RUBYGEMS VERSION: 1.3.7 - RUBY VERSION: 1.8.6 (2009-03-31
patchlevel 368) [i386-mswin32] - INSTALLATION DIRECTORY:
C:/IronRuby/lib/ironruby/gems/1.8 - RUBY EXECUTABLE:
C:/IronRuby/bin/ir.exe - EXECUTABLE DIRECTORY: C:/IronRuby/bin -
RUBYGEMS PLATFORMS:</p>
<pre>
<code>- ruby
- universal-dotnet-2.0</code>
</pre>
<ul>
<li>GEM PATHS:
<ul>
<li>C:/IronRuby/lib/ironruby/gems/1.8</li>
<li>C:/Users/will.green/.gem/ironruby/1.8</li>
</ul>
</li>
<li>GEM CONFIGURATION:
<ul>
<li>:update_sources => true</li>
<li>:verbose => true</li>
<li>:benchmark => false</li>
<li>:backtrace => false</li>
<li>:bulk_threshold => 1000</li>
<li>:sources => ["<a href=
"http://gemcutter.org">http://gemcutter.org</a>", "<a href=
"http://gems.rubyforge.org/">http://gems.rubyforge.org/</a>"]</li>
<li>"gem" => "--no-ri --no-rdoc"</li>
</ul>
</li>
<li>REMOTE SOURCES:
<ul>
<li><a href="http://gemcutter.org">http://gemcutter.org</a></li>
<li><a href=
"http://gems.rubyforge.org/">http://gems.rubyforge.org/</a></li>
</ul>
</li>
</ul>
<p>C:\Users\will.green></p>
<p>-- Will Green<br>
<a href="http://hotgazpacho.org/">http://hotgazpacho.org/</a></p></div>Will Greentag:help.rubygems.org,2010-01-19:Comment/17385182010-11-17T07:29:37Z2010-11-17T07:29:37ZCan't install gems whose platform is universal-dotnet<div><p>Will, what's the current behavior?</p></div>John Barnettetag:help.rubygems.org,2010-01-19:Comment/17385182011-06-03T15:35:34Z2011-06-03T15:35:34ZCan't install gems whose platform is universal-dotnet<div><p>Hello, has this been sorted out?</p></div>Luis Lavena