|
|
IronRuby > Documentation > Real Ruby Applications and Libraries > RubyGems
RubyGemsFrom $1Table of contents
RubyGems 1.2 (will be updated to 1.3.1) is included with IronRuby. The "bin" folder also includes igem.bat which can be used to manage gems with IronRuby, similar to the gem.bat used by MRI. UsageThere are two ways to use gems:
Many gems create wrapper batch files for convinience. For example, the Rails gem adds rails.bat to the bin folder, and the Cucumber gem adds cucumber.bat to the bin folder. However, these batch fails run the gem with MRI. Therefore, you will need to manually create IronRuby versions of these batch files. The IronRuby releases include a few such batch files (eg. irails.bat), but it cannot include them all. Also, note that you can use the GEM_BIN folder to control where "gem install" will install such batch files in case you do not like the default location of the "bin" folder. Native gemsNative gems are gems with Ruby native extensions containing native code. The platform attribute will be Gem::Platform::Win32, and gem filename will be something like foo-1.2.3-win32.gem. Native extensions are not supported by IronRuby. Currently, there is no known way of avoiding native gems. When you install gems, you will have to manually exclude gems with win32 in the name. If a native gem is installed by MRI and you are sharing gems with MRI, requiring the gem can fail even if you have a version with platform=ruby installed [Need to check exactly what happens in this case, and which platform gets precedence]. CLR gemsGems with CLR assemblies should be marked with platform = "ironruby". [Need to check if this works seamlessly, if the assembly loads fine, if the gem can consist of multiple assemblies or if there will be LoadFrom problems, etc] Known issues
Tags:
|