Can't install gems whose platform is universal-dotnet
Using IronRuby 1.0, I can ir -S gem search -r
iron-term-ansicolor, and see that it is published. However,
when I try to ir -S gem install iron-term-ansicolor, I
get:
ERROR: Could not find a valid gem 'iron-term-ansicolor' (>= 0) in any repository
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?
Support Staff 2 Posted by Eric Hodel on 20 May, 2010 06:22 PM
What is your platform?
gem envwill say.3 Posted by Will Green on 20 May, 2010 06:28 PM
- RUBYGEMS PLATFORMS:
- ruby
- universal-dotnet
- universal-dotnet-2.0
Does the order matter?
--
Will Green
http://hotgazpacho.org/
4 Posted by Will Green on 24 May, 2010 05:17 PM
Pretty sure that this is is because RubyGems.org is not running RubyGems 1.3.7 (as confirmed by Nick Quaranto over Twitter: http://twitter.com/qrush/status/14388448710), where platform support for IronRuby was introduced.
Support Staff 5 Posted by Eric Hodel on 24 May, 2010 09:19 PM
The platform support is only required on the ironruby side of things, not on the server.
As far as the server cares platforms are just a string.
I'm unable to reproduce your problem:
$ gem install iron-term-ansicolor --platform universal-dotnet -i ~/tmp/gems Successfully installed term-ansicolor-1.0.5
Successfully installed iron-term-ansicolor-0.0.5-universal-dotnet
2 gems installed
Installing ri documentation for term-ansicolor-1.0.5...
Installing ri documentation for iron-term-ansicolor-0.0.5-universal-dotnet...
Installing RDoc documentation for term-ansicolor-1.0.5...
Installing RDoc documentation for iron-term-ansicolor-0.0.5-universal-dotnet...
$ gem install iron-term-ansicolor --platform universal-dotnet-2.0 -i ~/tmp/gems Successfully installed term-ansicolor-1.0.5
Successfully installed iron-term-ansicolor-0.0.5-universal-dotnet
2 gems installed
Installing ri documentation for term-ansicolor-1.0.5...
Installing ri documentation for iron-term-ansicolor-0.0.5-universal-dotnet...
Installing RDoc documentation for term-ansicolor-1.0.5...
Installing RDoc documentation for iron-term-ansicolor-0.0.5-universal-dotnet...
PS:
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?
6 Posted by Will Green on 25 May, 2010 06:55 AM
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'.
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'.
Also, the install command calls Gem::Platform::match (which uses ==, not ===).
Support Staff 7 Posted by Eric Hodel on 25 May, 2010 04:14 PM
I don't think the server has that much code in it as the platform is correct in the specs file:
["iron-term-ansicolor", #<Gem::Version "0.0.5">, "universal-dotnet"]
And in the remote gemspec itself:
$ gem spec --platform universal-dotnet -r iron-term-ansicolor | head --- !ruby/object:Gem::Specification name: iron-term-ansicolor
version: !ruby/object:Gem::Version
hash: 21 segments: - 0 - 0 - 5 version: 0.0.5 platform: universal-dotnet
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.
::match calls =~ which is an alias of ===.
8 Posted by Will Green on 25 May, 2010 04:33 PM
So, maybe it is an issue with RubyGems itself?
When it unmarshals the spec during the execution of the install command, the
@platform variable gets set to 'universal-unknown', while the
@original_platform gets set to the correct 'universal-dotnet'
--
Will Green
http://hotgazpacho.org/
On Tue, May 25, 2010 at 12:16 PM, drbrain <
[email blocked]<tender%[email blocked]>
> wrote:
> I don't think the server has that much code in it as the platform is
> correct in the specs file:
9 Posted by Thedric Walker on 01 Jun, 2010 02:54 PM
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:
G:>gem install iron-term-ansicolor --platform universal-dotnet
Successfully installed iron-term-ansicolor-0.0.5-universal-unknown
1 gem installed
Installing ri documentation for iron-term-ansicolor-0.0.5-universal-unknown...
Installing RDoc documentation for iron-term-ansicolor-0.0.5-universal-unknown...
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?
10 Posted by Will Green on 01 Jun, 2010 06:07 PM
Right, which would lend credence to my assertion that this is not a Ruby
implementation issue, but rather a issue with the Marshalling of the
Gem::Specification objects, which instantiate Gem::Platform objects. If the
server is not running 1.3.7 (which includes platform support for IronRuby),
then the instantiated Gem::Platform objects will not know what to do with
the string 'dotnet', and translate it to 'unknown'.
--
Will Green
http://hotgazpacho.org/
Support Staff 11 Posted by Nick Quaranto on 04 Jun, 2010 03:28 AM
As of last night we're on rubygems 1.3.7 on the server side. Any luck with this?
12 Posted by Thedric Walker on 04 Jun, 2010 08:31 PM
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.
13 Posted by Will Green on 22 Jun, 2010 07:09 PM
Closer:
C:\Users\will.green>gem search -r iron-term-ansicolor
*** REMOTE GEMS ***
iron-term-ansicolor (0.0.5 universal-dotnet universal-dotnet)
C:\Users\will.green>gem env
RubyGems Environment:
- 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:
- ruby
- universal-dotnet-2.0
- GEM PATHS:
- C:/IronRuby/lib/ironruby/gems/1.8
- C:/Users/will.green/.gem/ironruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://gemcutter.org", "http://gems.rubyforge.org/"]
- "gem" => "--no-ri --no-rdoc"
- REMOTE SOURCES:
- http://gemcutter.org
- http://gems.rubyforge.org/
C:\Users\will.green>
--
Will Green
http://hotgazpacho.org/
Support Staff 14 Posted by John Barnette on 17 Nov, 2010 07:29 AM
Will, what's the current behavior?
Support Staff 15 Posted by Luis Lavena on 03 Jun, 2011 03:35 PM
Hello, has this been sorted out?