<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Sprint</title>
	<atom:link href="http://sprint.inspiresynergy.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://sprint.inspiresynergy.com</link>
	<description>the Inspire Synergy 's Development Blog</description>
	<pubDate>Mon, 24 Nov 2008 15:46:07 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Celebrate for Rails 2.2: i18n, HTTP validators, thread safety, JRuby/1.9 compatibility, docs</title>
		<link>http://sprint.inspiresynergy.com/2008/11/celebrate-for-rails-22-i18n-http-validators-thread-safety-jruby19-compatibility-docs/</link>
		<comments>http://sprint.inspiresynergy.com/2008/11/celebrate-for-rails-22-i18n-http-validators-thread-safety-jruby19-compatibility-docs/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 15:44:37 +0000</pubDate>
		<dc:creator>tkwong</dc:creator>
		
		<category><![CDATA[Ruby On Rails]]></category>

		<category><![CDATA[rails]]></category>

		<category><![CDATA[rails 2.2]]></category>

		<category><![CDATA[ror]]></category>

		<guid isPermaLink="false">http://sprint.inspiresynergy.com/?p=19</guid>
		<description><![CDATA[Finally the long waiting rails 2.2 is released.
Referring to riding rails latest blog post , rails 2.2.2 released at November 21, 2008.
As we have tried the 2.2.1 version, i have solved rubygems upgrade problem. for rubygems 1.1 or 1.2 folks you may try :
$ gem install rubygems-update  (again, might need to be admin/root)
$ update_rubygems [...]]]></description>
			<content:encoded><![CDATA[<p>Finally the long waiting rails 2.2 is released.</p>
<p>Referring to <a href="http://weblog.rubyonrails.org/2008/11/21/rails-2-2-i18n-http-validators-thread-safety-jruby-1-9-compatibility-docs" target="_blank">riding rails latest blog post</a> , rails 2.2.2 released at November 21, 2008.</p>
<p>As we have tried the 2.2.1 version, i have solved rubygems upgrade problem. for rubygems 1.1 or 1.2 folks you may try :</p>
<pre><code>$ gem install rubygems-update  (again, might need to be admin/root)
$ update_rubygems              (... here too)
</code></pre>
<p>After successfully updated, we may try out the gem install rails and it would succesfully installed :</p>
<pre>apple-computer:~ tszkan$ sudo gem install rails -v 2.2.2
Successfully installed activesupport-2.2.2
Successfully installed activerecord-2.2.2
Successfully installed actionpack-2.2.2
Successfully installed actionmailer-2.2.2
Successfully installed activeresource-2.2.2
Successfully installed rails-2.2.2
6 gems installed
Installing ri documentation for activesupport-2.2.2...
Installing ri documentation for activerecord-2.2.2...
Installing ri documentation for actionpack-2.2.2...
Installing ri documentation for actionmailer-2.2.2...
Installing ri documentation for activeresource-2.2.2...
Installing RDoc documentation for activesupport-2.2.2...
Installing RDoc documentation for activerecord-2.2.2...
Installing RDoc documentation for actionpack-2.2.2...
Installing RDoc documentation for actionmailer-2.2.2...
Installing RDoc documentation for activeresource-2.2.2...
apple-computer:~ tszkan$ ls</pre>
<p>Besides my most waiting feature i18n support, here have some more christmas present from rails 2.2, include HTTP validators, thread safety, JRuby/1.9 compatibility, docs</p>
<p>we will try upgrading existing project to 2.2 , stay tuned.</p>
]]></content:encoded>
			<wfw:commentRss>http://sprint.inspiresynergy.com/2008/11/celebrate-for-rails-22-i18n-http-validators-thread-safety-jruby19-compatibility-docs/feed/</wfw:commentRss>
		</item>
		<item>
		<title>HACKs on acts_as_audited plugin</title>
		<link>http://sprint.inspiresynergy.com/2008/08/hacks-on-acts_as_audited-plugin/</link>
		<comments>http://sprint.inspiresynergy.com/2008/08/hacks-on-acts_as_audited-plugin/#comments</comments>
		<pubDate>Sun, 31 Aug 2008 03:54:03 +0000</pubDate>
		<dc:creator>wllee</dc:creator>
		
		<category><![CDATA[Ruby On Rails]]></category>

		<category><![CDATA[hack]]></category>

		<category><![CDATA[plugin]]></category>

		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://sprint.inspiresynergy.com/?p=18</guid>
		<description><![CDATA[Audit Trail
At many cases, we have a use case called &#8220;Please keep all changes as history, showing who had created, or updated such record and log the time s/he did that&#8221; &#8212; This is a typical audit trail task in a very common system.
&#8220;Tommy created Products at 2008-08-20&#8243; and &#8220;Thomas updated Orders at 2008-08-30 with [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Audit Trail</strong><br />
At many cases, we have a use case called &#8220;Please keep all changes as history, showing who had created, or updated such record and log the time s/he did that&#8221; &#8212; This is a typical audit trail task in a very common system.</p>
<p><strong>&#8220;Tommy created Products at 2008-08-20&#8243; and &#8220;Thomas updated Orders at 2008-08-30 with Price set to $100&#8243;</strong><br />
In rails, we have many cool plugins for doing this features. Some would log all the version you made to that particular model, or have the feature that you can revert the version back. In the current project, we simply need an audit statement but not the revision feature. No need to rollback&#8230;.it is too fancy.</p>
<p><strong>acts_as_audited</strong></p>
<p>Act as versioned: <a href="http://wiki.rubyonrails.org/rails/pages/ActsAsVersioned">http://wiki.rubyonrails.org/rails/pages/ActsAsVersioned</a></p>
<p>Act as audited: <a href="http://opensoul.org/2006/7/21/acts_as_audited">http://opensoul.org/2006/7/21/acts_as_audited</a></p>
<p>We have compared act as versioned and act as audited and finally made some hacks on the act as audited plugin.</p>
<p>As we use RESTful_authenticated for our customer model and administrator model, the plugin automatically draw the <code>user_type</code> to <code>Administrator</code> or <code>User</code>, while the username field is left out. We have done some hack to the plugin to log the ip address when the user is not logged in and store the ip into the field username.</p>
<p>Here is the hack:<br />
in <code>lib/acts_as_audited.rb</code>, pass also the ip address to the username field<br />
<code><br />
        def audit_create(user = nil, ip = nil)<br />
          write_audit(:action => 'create', :changes => audited_attributes, :user => user, :username => ip)<br />
        end<br />
        def audit_update(user = nil, ip = nil)<br />
          unless (changes = changed_audited_attributes).empty?<br />
            write_audit(:action => 'update', :changes => changes, :user => user, :username => ip)<br />
          end<br />
        end<br />
        def audit_destroy(user = nil, ip = nil)<br />
          write_audit(:action => 'destroy', :user => user, :username => ip)<br />
        end<br />
</code></p>
<p>in <code>audit_sweeper.rb</code>, retrieve the ip address from the request<br />
<code><br />
  def after_create(record)<br />
    # username field is HACKed to store the ip address<br />
    ip = request.remote_ip rescue ip = 'Unknown'<br />
    record.send(:audit_create, current_user, ip)<br />
  end<br />
  def after_destroy(record)<br />
    ip = request.remote_ip rescue ip = 'Unknown'<br />
    record.send(:audit_destroy, current_user, ip)<br />
  end<br />
  def before_update(record)<br />
    ip = request.remote_ip rescue ip = 'Unknown'<br />
    record.send(:audit_update, current_user, ip)<br />
  end<br />
</code></p>
<p>In addition, a namescope is added to the audit.rb to retrieve a particular admin&#8217;s history on particular model:<br />
<code><br />
  # name scope for retrieving a particular admin's history on particular model<br />
  named_scope :history,    lambda {|model,admin|  {:conditions => ['user_type = ? and user_id = ? and auditable_type = ? ', 'Administrator' , admin, model]}}<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://sprint.inspiresynergy.com/2008/08/hacks-on-acts_as_audited-plugin/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Migrate from Acts As Taggable On Steroids to Acts As Taggable On</title>
		<link>http://sprint.inspiresynergy.com/2008/08/migrate-from-acts-as-taggable-on-steroids-to-acts-as-taggable-on/</link>
		<comments>http://sprint.inspiresynergy.com/2008/08/migrate-from-acts-as-taggable-on-steroids-to-acts-as-taggable-on/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 13:51:01 +0000</pubDate>
		<dc:creator>tkwong</dc:creator>
		
		<category><![CDATA[Ruby On Rails]]></category>

		<category><![CDATA[migration]]></category>

		<category><![CDATA[plugin]]></category>

		<category><![CDATA[tag]]></category>

		<guid isPermaLink="false">http://sprint.inspiresynergy.com/?p=17</guid>
		<description><![CDATA[Acts As Taggable On Steroids is based on acts_as_taggable by DHH but includes extras such as
tests, smarter tag assignment, and tag cloud calculations.
For a number of applications, especially our Tutor Social Platform - Tutor Metro,  We’ve found a need for advanced tagging functionality not offered by the acts_as_taggable_on_steroids plugin.
for instance, we will wished a model [...]]]></description>
			<content:encoded><![CDATA[<p>Acts As Taggable On Steroids is based on acts_as_taggable by DHH but includes extras such as</p>
<p>tests, smarter tag assignment, and tag cloud calculations.</p>
<p>For a number of applications, especially our <a href="http://www.tutormetro.com">Tutor Social Platform - Tutor Metro</a>,  We’ve found a need for advanced tagging functionality not offered by the <a href="http://agilewebdevelopment.com/plugins/acts_as_taggable_on_steroids">acts_as_taggable_on_steroids</a> plugin.</p>
<p>for instance, we will wished a model could have multiple “sets” of tags that would function both independently and together and named scope support</p>
<p>That’s where acts_as_taggable_on comes in.</p>
<p>From <a href="http://github.com/mbleigh">mbleigh</a><span> :</span></p>
<blockquote><p>For instance, in a social network, a user might have tags that are called skills, interests, sports, and more. There is no real way to differentiate between tags and so an implementation of this type is not possible with acts as taggable on steroids. Enter Acts as Taggable On. Rather than tying functionality to a specific keyword (namely &#8220;tags&#8221;), acts as taggable on allows you to specify an arbitrary number of tag &#8220;contexts&#8221; that can be used locally or in combination in the same way steroids was used.</p></blockquote>
<p>To install, that is very simple from the project site, however, if we want to migrate from taggable on steroids in previous project, we have to do some more tweaking :</p>
<p>1. install gems or plugin as normal</p>
<p>2. generate the migration as usual</p>
<pre>script/generate acts_as_taggable_on_migration</pre>
<p>3. suppose you have an acts_as_taggable migration before, we have to do less in this migration .  modify the migration as following</p>
<p><code><br />
class ActsAsTaggableOnMigration &lt; ActiveRecord::Migration<br />
</code><br />
<code><br />
def self.up<br />
    remove_index :taggings, [:taggable_id,:taggable_type]<br />
    add_column :taggings, :tagger_id, :integer<br />
    add_column :taggings, :tagger_type, :string<br />
    add_column :taggings, :context, :string<br />
        t.column :tagger_id, :integer<br />
        t.column :tagger_type, :string<br />
        t.column :context, :string<br />
    create_table :tags do |t|<br />
        t.column :name, :string<br />
    end<br />
    create_table :taggings do |t|<br />
        t.column :tag_id, :integer<br />
        t.column :taggable_id, :integer<br />
        t.column :tagger_id, :integer<br />
        t.column :tagger_type, :string<br />
        # You should make sure that the column created is<br />
        # long enough to store the required class names.<br />
        t.column :taggable_type, :string<br />
        t.column :context, :string<br />
        t.column :created_at, :datetime<br />
    end<br />
    add_index :taggings, :tag_id<br />
    add_index :taggings, [:taggable_id, :taggable_type, :context] , :name =&gt; &#8216;index_taggings&#8217;<br />
end<br />
</code></p>
<p><code><br />
def self.down<br />
  remove_index :taggings, :name =&gt; 'index_taggings'<br />
  add_index :taggings, [:taggable_id, :taggable_type]<br />
  remove_column :taggings, :tagger_id<br />
  remove_column :taggings, :tagger_type<br />
  remove_column :taggings, :context<br />
  drop_table :taggings<br />
  drop_table :tags<br />
end<br />
</code><br />
<code><br />
end</code></p>
<p>4. rake db:migrate</p>
<p>5. add parameters to the acts_as_taggable_on</p>
<pre>class Photo &lt; ActiveRecord::Base  acts_as_taggable_on :tagsend</pre>
<p>6. fix your code on getting the tag list</p>
<p>7. do your testing, and you may have it done, cheer !</p>
]]></content:encoded>
			<wfw:commentRss>http://sprint.inspiresynergy.com/2008/08/migrate-from-acts-as-taggable-on-steroids-to-acts-as-taggable-on/feed/</wfw:commentRss>
		</item>
		<item>
		<title>&#8220;Awesome&#8221; Nested Set</title>
		<link>http://sprint.inspiresynergy.com/2008/08/awesome-nested-set/</link>
		<comments>http://sprint.inspiresynergy.com/2008/08/awesome-nested-set/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 20:28:58 +0000</pubDate>
		<dc:creator>wllee</dc:creator>
		
		<category><![CDATA[Ruby On Rails]]></category>

		<category><![CDATA[plugin]]></category>

		<category><![CDATA[ruby_on_rails]]></category>

		<guid isPermaLink="false">http://sprint.inspiresynergy.com/?p=16</guid>
		<description><![CDATA[During the development of our latest product, we have to store a set of data in a tree structure. Usually we would implement the tree in nested set, if we found that we usually fetch the tree but not update the tree. Nested Set structure would have a bigger overhead if we do update on [...]]]></description>
			<content:encoded><![CDATA[<p>During the development of our latest product, we have to store a set of data in a tree structure. Usually we would implement the tree in nested set, if we found that we usually fetch the tree but not update the tree. Nested Set structure would have a bigger overhead if we do update on the tree but it is excellent in fetching, the main reason is that when we do update on the tree, we would index the entire tree again.</p>
<p><strong>What is Nested Set?</strong></p>
<p>Nested Set is a hierarchical data structure that store your data as a tree in the database. For more detail, you could go here <a href="http://dev.mysql.com/tech-resources/articles/hierarchical-data.html">http://dev.mysql.com/tech-resources/articles/hierarchical-data.html</a></p>
<p><strong>Nested Set Plugin for RoR</strong></p>
<p>We have implemented Nested Set in many projects, we make use of plugin, which give us handy functions to manipulate our &#8220;tree&#8221;. We used old plugin acts_as_<span class="searchword2">nested</span>_<span class="searchword3">set</span>, and then use <a href="http://wiki.rubyonrails.org/rails/pages/BetterNestedSet ">better_nested_set </a>(which is to replace the old one).</p>
<p>These day when we work on our latest project, we found that there is a latest plugin named <a href="http://github.com/collectiveidea/awesome_nested_set/tree/master">awesome_nested_set</a>, which is to replace all its previous version.</p>
<p>We just wonder will there be any &#8220;amazing_nested_set&#8221; or &#8220;it_is_really_fuking_amazing_nested_set&#8221; later on. =p</p>
<p>btw, this plugin is really awesome.</p>
]]></content:encoded>
			<wfw:commentRss>http://sprint.inspiresynergy.com/2008/08/awesome-nested-set/feed/</wfw:commentRss>
		</item>
		<item>
		<title>TutorMetro.com is on alpha</title>
		<link>http://sprint.inspiresynergy.com/2008/08/tutormetrocom-is-on-alpha/</link>
		<comments>http://sprint.inspiresynergy.com/2008/08/tutormetrocom-is-on-alpha/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 01:20:15 +0000</pubDate>
		<dc:creator>wllee</dc:creator>
		
		<category><![CDATA[Project]]></category>

		<category><![CDATA[Ruby On Rails]]></category>

		<category><![CDATA[launch]]></category>

		<category><![CDATA[pilot]]></category>

		<guid isPermaLink="false">http://sprint.inspiresynergy.com/?p=10</guid>
		<description><![CDATA[After a session of development, our web site www.tutormetro.com is finally out in alpha release.
TutorMetro.com got an internal project code: pilot, which is aimed at providing a free tuition referral platform to local market.「名師」is the Chinese Name of tutormetro.com which represent the high quality of the tutors listed in the site.
TutorMetro.com is built solely on [...]]]></description>
			<content:encoded><![CDATA[<p>After a session of development, our web site <a href="http://www.tutormetro.com">www.tutormetro.com</a> is finally out in alpha release.</p>
<p>TutorMetro.com got an internal project code: pilot, which is aimed at providing a free tuition referral platform to local market.「名師」is the Chinese Name of tutormetro.com which represent the high quality of the tutors listed in the site.</p>
<p>TutorMetro.com is built solely on Ruby on Rails 2.0+, we enjoyed the development process on rails and we are still working on the TutorMetro.com and other cool rails projects.</p>
<p>Give a register on TutorMetro, and report us bugs if there is any <img src='http://sprint.inspiresynergy.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://sprint.inspiresynergy.com/2008/08/tutormetrocom-is-on-alpha/feed/</wfw:commentRss>
		</item>
		<item>
		<title>BDD Behaviour Driven Development</title>
		<link>http://sprint.inspiresynergy.com/2008/07/bdd-behaviour-driven-development/</link>
		<comments>http://sprint.inspiresynergy.com/2008/07/bdd-behaviour-driven-development/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 12:15:07 +0000</pubDate>
		<dc:creator>wllee</dc:creator>
		
		<category><![CDATA[Ruby On Rails]]></category>

		<category><![CDATA[BDD]]></category>

		<guid isPermaLink="false">http://sprint.inspiresynergy.com/?p=9</guid>
		<description><![CDATA[In Hong Kong, as a fast moving city, &#8220;urgent&#8221; is one of the most common requirement from the clients. They require the most &#8220;cost-effective&#8221; way to implement systems and with a marginal price. For these low budget (but urgent) projects, some of the local software houses would simply deliver a &#8220;just-to-requirement&#8221; and &#8220;not-well-tested&#8221; solution to [...]]]></description>
			<content:encoded><![CDATA[<p>In Hong Kong, as a fast moving city, &#8220;urgent&#8221; is one of the most common requirement from the clients. They require the most &#8220;cost-effective&#8221; way to implement systems and with a marginal price. For these low budget (but urgent) projects, some of the local software houses would simply deliver a &#8220;just-to-requirement&#8221; and &#8220;not-well-tested&#8221; solution to the client &#8212; the result is poor client satisfaction.</p>
<p>What we believe is &#8212; quality software is the base of the success of one software company. Therefore, we strictly adopt the agile development process and BDD is one of the testing approach we used.</p>
<p>In order to perform effective testing across increasing complex application, we adopted BDD in our projects. Some of the developers are lazy to write test cases throughout the development as they found that some test cases are meaningless to be written. When the application complexity increases, testing would be the harshest part of the development process.</p>
<p>Here is an example of &#8220;meaningless&#8221; test case:</p>
<blockquote><p>class UserTest &lt; Test::Unit::TestCase<br />
def test_create<br />
user = User.create(:some =&gt; &#8216;params&#8217;)<br />
assert user.save<br />
end<br />
end</p></blockquote>
<p>In this kind of test case which we regard as &#8220;meaningless&#8221; because it tests on the framework but not our own code. What we need is an effective testing across our codes.</p>
<p><strong>Some Background</strong></p>
<p>What is BDD? Behaviour Driven Development is an Agile development process that comprises aspects of Acceptance Test Driven Planning, Domain Driven Design and Test Driven Development.</p>
<p>RSpec is a BDD tool aimed at TDD in the context of BDD. And as our application is mainly built on Ruby on Rails, what we need is RSpec and RSpec on Rails plugins for our applications.</p>
<p>For more details on BDD: http://en.wikipedia.org/wiki/Behavior_driven_development</p>
<p>And more details for RSpec: http://rspec.info/</p>
<p>To install the plugin of RSpec and RSpec on Rails, what we need is to go here</p>
<p>http://github.com/dchelimsky/rspec-rails/wikis/home</p>
<p>but for the latest version (v 1.1.4) it only offers git repos to install, and we get some time to install the git into our system (as we have sticked to svn for long)&#8230;&#8230;</p>
<p>We uses RSpec for testing as it is somehow more realistic to test the application on the &#8220;behaviour&#8221; instead of unit. Here is a piece of test case we wrote to illustrate the ellegance of the BDD:</p>
<blockquote><p>describe Bid do<br />
it &#8217;should create reference id automatically&#8217; do<br />
@bid = Bid.new<br />
@bid.reference_id.should_not be_nil<br />
end<br />
end</p></blockquote>
<p>It is a test case to test whether the &#8216;reference_id&#8217; would be created automatically when we &#8216;new&#8217; the Bid object. We are testing on the application behaviour rather than testing whether we can create the object.</p>
<p>Here is the result, printing in a nice specdoc format:</p>
<blockquote><p>$ spec spec/models/bid_spec.rb &#8211;format specdoc<br />
Bid<br />
- should create reference id automatically<br />
Finished in 0.138937 seconds<br />
1 example, 0 failures</p></blockquote>
<p>btw, git is the next part we should spend time to explore, probaby after we finish some important client&#8217;s projects&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://sprint.inspiresynergy.com/2008/07/bdd-behaviour-driven-development/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Unpacking Apple iPhone 3G 16Gb White</title>
		<link>http://sprint.inspiresynergy.com/2008/07/unpacking-apple-iphone-3g-16gb-white/</link>
		<comments>http://sprint.inspiresynergy.com/2008/07/unpacking-apple-iphone-3g-16gb-white/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 11:41:36 +0000</pubDate>
		<dc:creator>wllee</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://sprint.inspiresynergy.com/?p=8</guid>
		<description><![CDATA[This is the latest Apple iPhone 3G 16Gb White color in our hands.

Fast and smooth unpacking.
All our staffs use iPhone, no matter it is 2G or 3G and iPhone really helps increasing our productivity by allowing us to work anywhere, anytime.
]]></description>
			<content:encoded><![CDATA[<p>This is the latest Apple iPhone 3G 16Gb White color in our hands.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/4qZzNmQQpPs" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/4qZzNmQQpPs"></embed></object></p>
<p>Fast and smooth unpacking.</p>
<p>All our staffs use iPhone, no matter it is 2G or 3G and iPhone really helps increasing our productivity by allowing us to work anywhere, anytime.</p>
]]></content:encoded>
			<wfw:commentRss>http://sprint.inspiresynergy.com/2008/07/unpacking-apple-iphone-3g-16gb-white/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Configuring Rails 2.1 To Use Gmail’s SMTP Server</title>
		<link>http://sprint.inspiresynergy.com/2008/06/configuring-rails-21-to-use-gmail%e2%80%99s-smtp-server/</link>
		<comments>http://sprint.inspiresynergy.com/2008/06/configuring-rails-21-to-use-gmail%e2%80%99s-smtp-server/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 11:24:34 +0000</pubDate>
		<dc:creator>wllee</dc:creator>
		
		<category><![CDATA[Ruby On Rails]]></category>

		<category><![CDATA[gmail google email tls smtp]]></category>

		<guid isPermaLink="false">http://sprint.inspiresynergy.com/?p=7</guid>
		<description><![CDATA[Tutormetro uses Google Apps For Your Domain, and all email flows throw Google’s servers. Unfortunately, Rails 1.2.2 or later cannot send via smtp.google.com out of the box as it use tls, which standard ruby package is not included.
There is a solution from http://railsforum.com/viewtopic.php?id=12875 .We have deployed and tested in our Pilot site. Here are the [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Tutor Metro" href="http://www.tutormetro.com" target="_blank">Tutormetro</a> uses <a onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.google.com/a/');" href="http://www.google.com/a/">Google Apps For Your Domain</a>, and all email flows throw Google’s servers. Unfortunately, Rails 1.2.2 or later cannot send via <em>smtp.google.com</em> out of the box as it use tls, which standard ruby package is not included.</p>
<p>There is a solution from http://railsforum.com/viewtopic.php?id=12875 .We have deployed and tested in our Pilot site. Here are the step we go thro.</p>
<ol>
<li>include vendor/plugin/action_mailer_tls</li>
<li>create<strong> config/initializers/mail.rb</strong><strong><span class="Apple-style-span" style="font-weight: normal;"><br />
</span></strong></li>
<li>use ActionMailer as normal</li>
</ol>
<blockquote>
<div id="code_3" class="unfolded">
<div class="code-box">
<p>#vendor/plugins/action_mailer_tls/init.rb<br />
require_dependency &#8217;smtp_tls&#8217;
</p></div>
<div class="code-box">
#vendor/plugins/action_mailer_tls/lib/smtp_tls.rb<br />
require &#8220;openssl&#8221;<br />
require &#8220;net/smtp&#8221;</p>
<p>Net::SMTP.class_eval do<br />
private<br />
def do_start(helodomain, user, secret, authtype)<br />
raise IOError, &#8216;SMTP session already started&#8217; if @started<br />
check_auth_args user, secret, authtype if user or secret</p>
<p>sock = timeout(@open_timeout) { TCPSocket.open(@address, @port) }<br />
@socket = Net::InternetMessageIO.new(sock)<br />
@socket.read_timeout = 60 #@read_timeout<br />
@socket.debug_output = STDERR #@debug_output</p>
<p>check_response(critical { recv_response() })<br />
do_helo(helodomain)</p>
<p>raise &#8216;openssl library not installed&#8217; unless defined?(OpenSSL)<br />
starttls<br />
ssl = OpenSSL::SSL::SSLSocket.new(sock)<br />
ssl.sync_close = true<br />
ssl.connect<br />
@socket = Net::InternetMessageIO.new(ssl)<br />
@socket.read_timeout = 60 #@read_timeout<br />
@socket.debug_output = STDERR #@debug_output<br />
do_helo(helodomain)</p>
<p>authenticate user, secret, authtype if user<br />
@started = true<br />
ensure<br />
unless @started<br />
# authentication failed, cancel connection.<br />
@socket.close if not @started and @socket and not @socket.closed?<br />
@socket = nil<br />
end<br />
end</p>
<p>def do_helo(helodomain)<br />
begin<br />
if @esmtp<br />
ehlo helodomain<br />
else<br />
helo helodomain<br />
end<br />
rescue Net::ProtocolError<br />
if @esmtp<br />
@esmtp = false<br />
@error_occured = false<br />
retry<br />
end<br />
raise<br />
end<br />
end</p>
<p>def starttls<br />
getok(&#8217;STARTTLS&#8217;)<br />
end</p>
<p>def quit<br />
begin<br />
getok(&#8217;QUIT&#8217;)<br />
rescue EOFError<br />
end<br />
end<br />
end</p>
</div>
<div class="code-box"># config/initializers/mail.rb</div>
<div class="code-box">ActionMailer::Base.delivery_method = :smtp<br />
ActionMailer::Base.smtp_settings = {<br />
:address =&gt; &#8220;smtp.gmail.com&#8221;,<br />
:port =&gt; 587,<br />
:authentication =&gt; :plain,<br />
:user_name =&gt; &#8220;username@your-domain.com&#8221;,<br />
:password =&gt; &#8220;password&#8221;</div>
<div class="code-box">}</div>
<div class="code-box">
</div>
</div>
</blockquote>
<div class="code-box">One thing we need to be sure is to use a email user name without special char. We tried to use no-reply@xxx.com but it failed to login gmail auth system.</div>
<div class="code-box">
</div>
<blockquote>
<div class="code-box"></div>
<div class="code-box"></div>
</blockquote>
<div class="code-box"></div>
]]></content:encoded>
			<wfw:commentRss>http://sprint.inspiresynergy.com/2008/06/configuring-rails-21-to-use-gmail%e2%80%99s-smtp-server/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Multilingual Full Text Search on Ferret</title>
		<link>http://sprint.inspiresynergy.com/2008/06/multilingual-full-text-search-on-ferret/</link>
		<comments>http://sprint.inspiresynergy.com/2008/06/multilingual-full-text-search-on-ferret/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 10:58:46 +0000</pubDate>
		<dc:creator>tkwong</dc:creator>
		
		<category><![CDATA[Ruby On Rails]]></category>

		<category><![CDATA[ferret multilingual chinese]]></category>

		<guid isPermaLink="false">http://sprint.inspiresynergy.com/?p=6</guid>
		<description><![CDATA[Ferret&#8217;s analyzer perform terribly support for multilingual .
thanks for the plugin multilingual_ferret_tools 
Here is the description from it:

This plugin provides a multilingual-aware Analyzer for Ferret.  This analyzer is useful when
fields may contain characters from multiple languages.  Fields are broken into latin parts and
non-latin-parts- the latin parts are then processed with Ferret::Analysis::StandardAnalyzer, and
the non-latin [...]]]></description>
			<content:encoded><![CDATA[<p>Ferret&#8217;s analyzer perform terribly support for multilingual .<br />
thanks for the plugin <a rel="nofollow" href="http://svn.lingr.com/plugins/multilingual_ferret_tools/">multilingual_ferret_tools </a><br />
Here is the description from it:</p>
<blockquote>
<pre>This plugin provides a multilingual-aware Analyzer for Ferret.  This analyzer is useful when
fields may contain characters from multiple languages.  Fields are broken into latin parts and
non-latin-parts- the latin parts are then processed with Ferret::Analysis::StandardAnalyzer, and
the non-latin parts are processed with Ferret::Analysis::RegExpAnalyzer.  By default, the RegExpAnalyzer
used considers each character as a distinct token.

If you want to change the configuration of the delegated analyzers, you'll find that initialization
code in MultilingualFerretTools::Analyzer#token_stream_for.</pre>
</blockquote>
<p><a rel="nofollow" href="http://svn.lingr.com/plugins/multilingual_ferret_tools/">http://svn.lingr.com/plugins/multilingual_ferret_tools/</a></p>
<p>to install thru piston, simply execute below :</p>
<blockquote><p>piston import <a rel="nofollow" href="http://svn.lingr.com/plugins/multilingual_ferret_tools/">http://svn.lingr.com/plugins/multilingual_ferret_tools/</a> vender/plugins/multilingual_ferret_tools</p></blockquote>
<p>To enable ,add analyzer parameter to acts_as_ferret :</p>
<blockquote><p>acts_as_ferret (<br />
{:fields =&gt; {<br />
:name                  =&gt; { :boost =&gt; 2 },<br />
:chinese_name          =&gt; { :boost =&gt; 2 },<br />
:self_description      =&gt; { :boost =&gt; 1.5 },<br />
:subtitle              =&gt; {},<br />
:teaching_time_remarks =&gt; {},<br />
:description           =&gt; {},<br />
:extra_curriculums     =&gt; {},<br />
:job_description1      =&gt; {},<br />
:job_description2      =&gt; {},<br />
:primary_school        =&gt; {},<br />
:secondary_school      =&gt; {},<br />
:other_university      =&gt; {},<br />
:university_major      =&gt; {},<br />
:university_minors     =&gt; {},<br />
:professional_courses  =&gt; {},<br />
}},<br />
{:analyzer =&gt; MultilingualFerretTools::Analyzer.new })</p></blockquote>
<p><strong>Related:</strong></p>
<ul>
<li><a href="http://lucene.apache.org/" target="_blank">Lucene</a></li>
<li><a href="http://www.ibm.com/developerworks/cn/java/j-lo-lucene1/" target="_blank">实战 Lucene，第 1 部分: 初识 Lucene</a></li>
<li><a href="http://www.ibm.com/developerworks/cn/java/wa-lucene/" target="_blank">深入 Lucene 索引机制</a></li>
<li><a href="http://ferret.davebalmain.com/trac/wiki/FerretOnRails" target="_blank">act_as_ferret Project</a></li>
<li><a href="http://lukhnos.org/blog/zh/" target="_blank">acts_as_ferret: Rails全文搜尋快速上手（與中日韓文支援）</a></li>
<li><a href="http://blog.dragon2.net/2007/05/18/461.php" target="_blank">快快樂樂學 Ruby - 再談 Ferret</a></li>
<li>http://lukhnos.org/blog/zh/archives/501</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://sprint.inspiresynergy.com/2008/06/multilingual-full-text-search-on-ferret/feed/</wfw:commentRss>
		</item>
		<item>
		<title>gem dependencies in 2.1.0</title>
		<link>http://sprint.inspiresynergy.com/2008/06/gem-dependencies-in-210/</link>
		<comments>http://sprint.inspiresynergy.com/2008/06/gem-dependencies-in-210/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 04:23:48 +0000</pubDate>
		<dc:creator>tkwong</dc:creator>
		
		<category><![CDATA[Ruby On Rails]]></category>

		<category><![CDATA[gems]]></category>

		<category><![CDATA[ruby_on_rails]]></category>

		<guid isPermaLink="false">http://sprint.inspiresynergy.com/?p=5</guid>
		<description><![CDATA[In Rails 2.1 we now have the ability to set gem dependencies.
to config, we can add config.gem in config/environment.rb
When I try to add
config.gem &#8220;RedCloth&#8221;
config.gem &#8220;mime-types&#8221;
it throw RedCloth and mime-types error .seems it cannot detect the gems library and always execute gem install .
no such file to load &#8212; RedCloth
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require&#8217;
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require&#8217;
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require&#8217;
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new_constants_in&#8217;
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require&#8217;
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/rails/gem_dependency.rb:57:in `load&#8217;
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/symbol.rb:11:in [...]]]></description>
			<content:encoded><![CDATA[<p>In Rails 2.1 we now have the ability to set gem dependencies.</p>
<p>to config, we can add config.gem in config/environment.rb</p>
<p>When I try to add</p>
<blockquote><p>config.gem &#8220;RedCloth&#8221;</p>
<p>config.gem &#8220;mime-types&#8221;</p></blockquote>
<p>it throw RedCloth and mime-types error .seems it cannot detect the gems library and always execute gem install .</p>
<blockquote><p>no such file to load &#8212; RedCloth<br />
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require&#8217;<br />
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new_constants_in&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/rails/gem_dependency.rb:57:in `load&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/symbol.rb:11:in `__send__&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/symbol.rb:11:in `to_proc&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:246:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:246:in `load_gems&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:137:in `process&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:93:in `send&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:93:in `run&#8217;<br />
/root/apps/duncan_mod/config/environment.rb:13<br />
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require&#8217;<br />
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new_constants_in&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/tasks/misc.rake:3<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/tasks/gems.rake:15<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:518:in `invoke_prerequisites&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `send&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:515:in `invoke_prerequisites&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:507:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in `invoke_task&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in `top_level&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in `run&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31<br />
/usr/bin/rake:19:in `load&#8217;<br />
/usr/bin/rake:19<br />
no such file to load &#8212; mime-types<br />
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require&#8217;<br />
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new_constants_in&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/rails/gem_dependency.rb:57:in `load&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/symbol.rb:11:in `__send__&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/symbol.rb:11:in `to_proc&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:246:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:246:in `load_gems&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:137:in `process&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:93:in `send&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:93:in `run&#8217;<br />
/root/apps/duncan_mod/config/environment.rb:13<br />
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require&#8217;<br />
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new_constants_in&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/tasks/misc.rake:3<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/tasks/gems.rake:15<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:518:in `invoke_prerequisites&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `send&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:515:in `invoke_prerequisites&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:507:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in `invoke_task&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in `top_level&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in `run&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31<br />
/usr/bin/rake:19:in `load&#8217;<br />
/usr/bin/rake:19<br />
no such file to load &#8212; RedCloth<br />
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require&#8217;<br />
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new_constants_in&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/rails/gem_dependency.rb:57:in `load&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/symbol.rb:11:in `__send__&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/symbol.rb:11:in `to_proc&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:246:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:246:in `load_gems&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:142:in `process&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:93:in `send&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:93:in `run&#8217;<br />
/root/apps/duncan_mod/config/environment.rb:13<br />
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require&#8217;<br />
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new_constants_in&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/tasks/misc.rake:3<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/tasks/gems.rake:15<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:518:in `invoke_prerequisites&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `send&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:515:in `invoke_prerequisites&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:507:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in `invoke_task&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in `top_level&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in `run&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31<br />
/usr/bin/rake:19:in `load&#8217;<br />
/usr/bin/rake:19<br />
no such file to load &#8212; mime-types<br />
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require&#8217;<br />
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new_constants_in&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/rails/gem_dependency.rb:57:in `load&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/symbol.rb:11:in `__send__&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/symbol.rb:11:in `to_proc&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:246:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:246:in `load_gems&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:142:in `process&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:93:in `send&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:93:in `run&#8217;<br />
/root/apps/duncan_mod/config/environment.rb:13<br />
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require&#8217;<br />
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new_constants_in&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/tasks/misc.rake:3<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/tasks/gems.rake:15<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:518:in `invoke_prerequisites&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `send&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:515:in `invoke_prerequisites&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:507:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_chain&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in `invoke_task&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `each&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in `top_level&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in `run&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run&#8217;<br />
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31<br />
/usr/bin/rake:19:in `load&#8217;<br />
/usr/bin/rake:19<br />
gem install RedCloth<br />
Successfully installed RedCloth-3.0.4<br />
1 gem installed<br />
gem install mime-types<br />
Successfully installed mime-types-1.15<br />
1 gem installed<br />
Installing ri documentation for mime-types-1.15&#8230;<br />
Installing RDoc documentation for mime-types-1.15&#8230;</p></blockquote>
<p>however it is not my intend.. after reading http://rails.lighthouseapp.com/projects/8994/tickets/293-gem-dependencies-broken-in-2-1-0 , I noticed that we have to include :lib in the config if the library name isn&#8217;t the same as the gems name .</p>
<blockquote><p>config.gem &#8220;RedCloth&#8221; ,:lib =&gt; &#8216;redcloth&#8217;</p>
<p>config.gem &#8220;mime-types&#8221;, :lib =&gt; &#8216;mime/types&#8217;</p></blockquote>
<p>Cool</p>
]]></content:encoded>
			<wfw:commentRss>http://sprint.inspiresynergy.com/2008/06/gem-dependencies-in-210/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
