Rails_Draft_ARC_Case

Including Rails 2 with Solaris

Prashant Srinivasan and Amanda Waite
<Prashant.Srinivasan@Sun.COM>, <Amanda.Waite@Sun.COM>
21 February 2007

1.      Summary and motivation

        This project delivers Rails into Solaris.
        Ruby, the scripting language[1], and Rails, the associated web
        application framework[2] for the MVC pattern, are fast gaining popularity,
        and Rails' inclusion into Solaris is a major step toward completion of
        the RubyOnRails stack on Solaris, thus enabling Solaris to be the 
        preferred platform for RubyOnRails developers and deployments.

        The MySQL[6], and Postgres[7] database client libraries[8][9],
 	used by Rails to access the popular database back ends, are
 	included to make it seamless for a Rails developer to create a
        database backed web application.

	Certain dependencies(ie., Ruby libraries) of Rails, as listed in section 3,
	will also be delivered so as to have a complete and working Rails 
	installation "out of the box".

        This case seeks Micro Release Binding.

2.      Technical issues

        2.1.    Key objects.

        /usr/ruby/1.8/bin/rake
	/usr/ruby/1.8/bin/rails



	All other objects will be contained within the
        /var/ruby/1.8/gem_home hierarchy, specifically, in the
	  below directories:

                /var/ruby/1.8/gem_home/
                                      cache
    			              doc
		                      gems
				      specifications

        /usr/ruby/1.8/bin/<executable> will be linked symbolically
        from and from /usr/bin/<executable>. 

        The detailed directory and file layout for Rails is provided in
        Appendix 1.


        2.2.    Versioning

        The Rails development processes follow the ubiquitous
        "continuous development" model, typical of many Open Source projects.
        Currently, version 2.0.2 is the latest stable release.

	The Rails feature-set is controlled by the Rails community(ie.,
	external to Sun), and features are subject to change without
	notice.  That disclaimer aside, the community values backward
	compatibility in the following manner:

        The versioning model for Rails is
        <major>.<minor>.<micro>.  The compatibility expectations for Rails are as follows:

        (1) Version x.y.z is compatible for different values of z, such that z >= 0.
	(2) Version x.y.z is compatible for different values of y.  APIs may
	    be deprecated in y releases, but backward compatibility is expected.
        (3) Version x.y.z is not expected to be compatible for different
	    values of x.
        
	Rails does not have the concept of a development releases(versus
	production releases).  The "bleeding edge" development takes place
	in the svn trunk.  The stable, production ready branches are named
	<major>-<minor>-stable[12].  There are currently two[11], 2-0-stable, and 
	1-9-stable.
        Hence, any version x.y.z is suitable for inclusion with Solaris.


        2.3.    Packaging and Delivery

        The current proposal allows for the inclusion and coexistence
        of multiple versions of Rails by keeping each installation under
        a version-specific subdirectory(or file, as appropriate).  This 
	support for versioning is based on the way that Rubygems[5] versions
	libraries.
  	The package SUNWrails2u, and SUNWrails2r, will contain the Rails interfaces.
        The /var/ruby/1.8/gem_home directory is the home for Ruby libraries
        (gems)[10].

3.      Rails dependencies.

        Rails is generally defined as a Web Application Framework, 
        but it also includes all of the tools required for creating,
        deploying and testing Web Applications based on the Framework. 
        Rails depends on several other Ruby libraries, some are
        required in order for Rails to work, others are required to
        enable Rails applications to work with different Databases.
        Rails also requires the Rake tool to be installed. Rake is 
        used to run unit tests, to run what are known as database 
        migrations and is also used to simplify many development tasks.


        3.1.    Included Rails application/library dependencies.
        The Ruby Libraries required by Rails and which must be 
        integrated at the same time as Rails are:

                  activesupport
                  activerecord
                  actionpack
                  actionmailer
                  activeresource

        Additional Ruby Libraries required to support three of the most
        popular databases for Rails applications are:

                  mysql
                  postgres
                  sqllite
                

        The Ruby application components required by Rails and which must
        be integrated at the same time as Rails are:

                  rake


4.      Rails Internationalization.
	
        Rails provides no explicit support for internationalization, but instead 
        supports internationalization through application level plugins such as Globalize 
        or through Ruby-GetText-Package - a Ruby Localization Library modeled after
        GNU gettext. I18N and L10N are very much an application level problem 
        currently.

5.      Rails Documentation.

        Rails and it's dependencies provide their own extensive documentation 
        through the Ruby tools RDoc[3] and RI[3]. RDoc is effectively Javadoc for
        Ruby and it's data is accessed through a Web Browser. RI utilizes RDoc 
        and the RDoc data for each Ruby application or Library to provide 
        a formatted, command line version of the same data.

        Rails users moving from other platforms would expect to use RDoc and
        RI to access documentation. Users new to Rails would find that the
        majority of books and tutorials would guide them in the use of RDoc and
        RI.
        
6.      Interfaces

        6.1.    Imported Interfaces.

        NAME                            STABILITY               NOTES
	Ruby language implementation    Uncommitted		 PSARC/2007/600


        6.2.    Exported Interfaces.
        NAME                                 STABILITY               NOTES

        SUNWrails2u                         Uncommitted           Package Name
        SUNWrails2r                         Uncommitted           Package Name

        /usr/ruby/1.8/bin/rake              Uncommitted             Executable
        /usr/ruby/1.8/bin/rails             Uncommitted             Executable

        /usr/bin/rake                       Volatile             Symbolic link
        /usr/bin/rails                      Volatile             Symbolic link

        Rails Framework interfaces[4]       Uncommitted    Language Interfaces

        Dependent Libraries
        NAME         STABILITY               NOTES

	rake	        uncommitted	    Ruby build program with capabilities similar to Make.
	activesupport   uncommitted	    Utility classes/extensions for Rails standard library.
	activerecord    uncommitted	    O/R mapping library for Rails.
	actionpack      uncommitted         Enables web-request routing and handling in Rails.
	actionmailer    uncommitted	    Rails framework for email-service layers.
	activeresource  uncommitted         Object oriented REST services implementation.
	MySQL/Ruby      uncommitted	    MySQL connectivity layer.
	Ruby-postgres   uncommitted	    Postgresql connectivity layer.



7.      References.
        [1]     http://www.ruby-lang.org/
        [2]     http://www.rubyonrails.org/
        [3]     http://ruby.about.com/od/gettingstarted/qt/ruby_ri.htm
        [4]     http://api.rubyonrails.org
        [5]     http://www.rubygems.org/
        [6]	http://www.mysql.com/
        [7]	http://www.postgresql.org
        [8]	http://rubyforge.org/projects/ruby-postgres/
        [9]	http://rubyforge.org/frs/?group_id=4550
        [10]	http://jp.opensolaris.org/os/community/arc/caselog/2007/600/onepager/
        [11]	http://dev.rubyonrails.org/roadmap
        [12]	http://dev.rubyonrails.org/


Appendix 1:
Please refer to http://wikis.sun.com/download/attachments/7078712/var_ruby.txt



Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact