Namely, if Rake task is defined in such a way that it accepts parameters it is invoked with parameter value enclosed in brackets: RubyInstaller does not use standard Rake way of passing parameters. You already saw how to choose which version of Ruby will be built but you can alter build procedure by passing “arguments” to Rake task. Tasks clean and clobber are used to remove temporary and all files created during build process respectively. RubyInstaller unpacks sources and builds libraries and Ruby in the sandbox folder. Now I will briefly walk you through other Rake tasks which are important if you decide to build Ruby from sources. Similar set of options is defined for Ruby 2.2 and subset of these options is used for other packages used during build process. Last option is not important at the moment so we will skip it. Next three options in RubyInstaller's configuration file define full name of archive with Ruby sources, libraries that Ruby depends on and excluded library. Even though you can change configure options directly in the ruby_installer.rb file there is a much better way which we will explain soon. Script accepts arguments and these arguments are defined in the configure options part. Based on gathered information configure script generates Makefile which is then used to build application. You might wonder what configure script is? This script is used to query the system on which it is run for platform architecture, build and run-time dependencies, system environment, etc. Next option is important for build process since it defines configuration flags passed to configure script. It is directory within RubyInstaller output directory where all Ruby files needed for installer to be packed will be copied. The install directory here doesn't mean directory where Ruby will be installed by installer. After that, directory where sources will be unpacked is defined and it is followed by build and install directories. Checkout options are used if we want to build Ruby not from archives, but from the Subversion repository. In the first line of OpenStruct member definition Ruby version is set. Here is excerpt of the file related to Ruby 1.8: RubyInstaller automates the whole process of downloading build tools, configuring build environment, downloading sources and additional libraries needed for building Ruby and finally compiling it.Ī list of all packages RubyInstaller uses is kept in config\ruby_installer.rb file. Expect these tasks to be removed from the project. Ruby versions 1.8.x are obsolete and we will not use them. As their descriptions denote, they build various Ruby versions. The most important tasks in the list are rake rubyXX. Rake ruby 23 :repackage # rebuild rubyinstaller -2. Rake ruby 23 :package:installer # generate rubyinstaller -2. Rake ruby 23 :package:docs # generate ruby -2. Rake ruby 23 :package:archive # generate ruby -2. Rake ruby 23 :package # generate packages for ruby 2. Rake ruby 23 :install # install rubyinstaller -2. Rake release:upload # Upload release files Rake devkit:ls # List available DevKit flavors Rake devkit # Build DevKit installer and /or archives Rake clean # Remove any temporary products Rake book # Download and extract The Book of Ruby Try `gem install rdoc -v 3.12` and later `gem install rdoc_chm -v 3.1.0`
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |