Can't install gems whose platform is universal-dotnet

Will Green's Avatar

Will Green

20 May, 2010 04:10 PM

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?

  1. Support Staff 2 Posted by Eric Hodel on 20 May, 2010 06:22 PM

    Eric Hodel's Avatar

    What is your platform? gem env will say.

  2. 3 Posted by Will Green on 20 May, 2010 06:28 PM

    Will Green's Avatar

    - RUBYGEMS PLATFORMS:
        - ruby
        - universal-dotnet
        - universal-dotnet-2.0

    Does the order matter?

    --
    Will Green
    http://hotgazpacho.org/

  3. 4 Posted by Will Green on 24 May, 2010 05:17 PM

    Will Green's Avatar

    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.

  4. Support Staff 5 Posted by Eric Hodel on 24 May, 2010 09:19 PM

    Eric Hodel's Avatar

    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?

  5. 6 Posted by Will Green on 25 May, 2010 06:55 AM

    Will Green's Avatar

    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 ===).

  6. Support Staff 7 Posted by Eric Hodel on 25 May, 2010 04:14 PM

    Eric Hodel's Avatar

    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 ===.

  7. 8 Posted by Will Green on 25 May, 2010 04:33 PM

    Will Green's Avatar

    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:

  8. 9 Posted by Thedric Walker on 01 Jun, 2010 02:54 PM

    Thedric Walker's Avatar

    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?

  9. 10 Posted by Will Green on 01 Jun, 2010 06:07 PM

    Will Green's Avatar

    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/

  10. Support Staff 11 Posted by Nick Quaranto on 04 Jun, 2010 03:28 AM

    Nick Quaranto's Avatar

    As of last night we're on rubygems 1.3.7 on the server side. Any luck with this?

  11. 12 Posted by Thedric Walker on 04 Jun, 2010 08:31 PM

    Thedric Walker's Avatar

    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.

  12. 13 Posted by Will Green on 22 Jun, 2010 07:09 PM

    Will Green's Avatar

    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&quot;, "http://gems.rubyforge.org/&quot;]
         - "gem" => "--no-ri --no-rdoc"
      - REMOTE SOURCES:
         - http://gemcutter.org
         - http://gems.rubyforge.org/

    C:\Users\will.green>

    --
    Will Green
    http://hotgazpacho.org/

  13. Support Staff 14 Posted by John Barnette on 17 Nov, 2010 07:29 AM

    John Barnette's Avatar

    Will, what's the current behavior?

  14. Support Staff 15 Posted by Luis Lavena on 03 Jun, 2011 03:35 PM

    Luis Lavena's Avatar

    Hello, has this been sorted out?

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

29 Aug, 2014 06:23 PM
28 Aug, 2014 07:18 PM
27 Aug, 2014 12:03 PM
26 Aug, 2014 07:09 PM
26 Aug, 2014 07:07 PM