Based on some work that Shri and I did to figure this out, I have created and submitted a patch to Ruby Gems to include support form .Net native gems:
http://rubyforge.org/tracker/index.php?func=detail&aid=27951&group_id=126&atid=577 <http://rubyforge.org/tracker/index.php?func=detail&aid=27951&group_id=126&atid=577>As you can see, I've gotten some push-back from the Ruby Gems team on the naming of the platform for the gems. The problem is that they don't like the "." in ".net" (i.e. "universal-.net-2.0"), and have suggested alternatives such as "dotnet", "dotNet", and "Net". I have asked for clarification on their position. If I understand the Gem::Platform class correctly, the initialize method takes in the values read from RbConfig, and performs some translation to come up with a Gem platform name. So, without any changes to IronRuby itself, we could have gems with names like "iron-term-ansicolor-universal-dotnet". Of course, it would require a small tweak to the version of Ruby Gems that is distributed with IronRuby, but the change is very minor. So, does anyone object to .Net native gems like: "gemname-universal-dotnet" "gemname-universal-dotnet-2.0" "gemname-universal-dotnet-4.0" I think this would get the patch accepted more quickly. Is this kosher with LCA, or even something that needs to be brought to their attention? -- Will Green http://hotgazpacho.org/ On Sun, Mar 7, 2010 at 10:01 PM, Jim Deville <jdevi...@microsoft.com> wrote: > I’m also wondering what will happen if you put the gem on two different gem > servers (if that is possible, like github and rubyforge). Does gem attempt > all sources to find the most specific? Or does it go with the most specific > gem from the first source? > > > > JD > > > > *From:* ironruby-core-boun...@rubyforge.org [mailto: > ironruby-core-boun...@rubyforge.org] *On Behalf Of *Shri Borde > *Sent:* Sunday, March 07, 2010 6:53 PM > > *To:* ironruby-core@rubyforge.org > *Subject:* Re: [Ironruby-core] IronRuby version of existing gems > > > > Will, could you recreate the universal-.net gem again and push it? I think > it might have been created incorrectly. The persisted Gem::Specification has > @new_platform and @original_platform set to “universal-unknown” which might > happen if you create it with MRI as I had mentioned below… > > > > *From:* ironruby-core-boun...@rubyforge.org [mailto: > ironruby-core-boun...@rubyforge.org] *On Behalf Of *Shri Borde > *Sent:* Sunday, March 07, 2010 2:27 PM > *To:* ironruby-core@rubyforge.org > *Subject:* Re: [Ironruby-core] IronRuby version of existing gems > > > > My guess is that RubyGems tries to look for an exact platform match first. > If there is no exact match, it somehow prefers “ruby” over other platforms. > > > > Btw, you could just change clr_version in > Merlin\Main\Languages\Ruby\Libs\rbconfig.rb to “4.0” to simulate running on > .NET 4. After doing this and using the “—platform universal-.net” option, > iron-term-ansicolor-0.0.3-universal-.net*-2.0* was installed which was > surprising to me as I would have expected it to install > iron-term-ansicolor-0.0.3-universal-.net. When I used the “—platform > universal-.net-4.0” option, iron-term-ansicolor-0.0.3 was installed which > was also surprising. So there does not seem to be any way to install > iron-term-ansicolor-0.0.3-universal-.net. > > > > *From:* ironruby-core-boun...@rubyforge.org [mailto: > ironruby-core-boun...@rubyforge.org] *On Behalf Of *Will Green > *Sent:* Sunday, March 07, 2010 6:33 AM > *To:* ironruby-core > *Subject:* Re: [Ironruby-core] IronRuby version of existing gems > > > > Thanks, Daniele! > > > > I've got three version of iron-term-ansicolor out there on RubyGems.org: > > > > - iron-term-ansicolor-0.0.3 > (gemspec.platform="ruby") > - iron-term-ansicolor-0.0.3-universal-.net > (gemspec.platform="universal-.net") > - iron-term-ansicolor-0.0.3-universal-.net-2.0 > (gemspec.platform="universal-.net-2.0") > > > > It looks like the .Net 4 runtime selected the non-platform specific gem, > while the .Net 2 runtime selected the "universal-.net-2.0" gem. > > > -- > Will Green > http://hotgazpacho.org/ > > On Sun, Mar 7, 2010 at 4:01 AM, Daniele Alessandri <suppaki...@gmail.com> > wrote: > > On Sun, Mar 7, 2010 at 08:07, Will Green <w...@hotgazpacho.org> wrote: > > > I would appreciate if someone running the latest from git would try > > ir -S gem install iron-term-ansicolor > > on both the .Net 2 and the .Net 4 runtimes, and let me know which gem > gets > > installed. > > C:\Users\nrk\Repositories\ironruby\Merlin\Main\bin\Debug>ir --version > IronRuby 0.9.4.0 on .NET 2.0.50727.4200 > > C:\Users\nrk\Repositories\ironruby\Merlin\Main\bin\Debug>ir -S gem > install iron-term-ansicolor --no-rdoc --no-ri > > Successfully installed iron-term-ansicolor-0.0.3-universal-.net-2.0 > 1 gem installed > > C:\Users\nrk\Repositories\ironruby\Merlin\Main\bin\Debug>ir --version > IronRuby 0.9.4.0 on .NET 4.0.30128.1 > > C:\Users\nrk\Repositories\ironruby\Merlin\Main\bin\Debug>ir -S gem > install iron-term-ansicolor --no-rdoc --no-ri > > Successfully installed iron-term-ansicolor-0.0.3 > > 1 gem installed > > -- > Daniele Alessandri > http://www.clorophilla.net/ > http://twitter.com/JoL1hAHN > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core@rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core@rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > >
_______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core