<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Gus Ortiz's Weblog</title>
	<atom:link href="http://gusortiz.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://gusortiz.wordpress.com</link>
	<description>Sharing with the comunity</description>
	<lastBuildDate>Tue, 05 May 2009 16:41:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='gusortiz.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Gus Ortiz's Weblog</title>
		<link>http://gusortiz.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://gusortiz.wordpress.com/osd.xml" title="Gus Ortiz&#039;s Weblog" />
	<atom:link rel='hub' href='http://gusortiz.wordpress.com/?pushpress=hub'/>
		<item>
		<title>[Ruby on Rails] Custom search with act_as_seekable gem/plugin</title>
		<link>http://gusortiz.wordpress.com/2009/05/05/ruby-on-rails-custom-search-with-act_as_seekable-gem-plugin/</link>
		<comments>http://gusortiz.wordpress.com/2009/05/05/ruby-on-rails-custom-search-with-act_as_seekable-gem-plugin/#comments</comments>
		<pubDate>Tue, 05 May 2009 16:14:36 +0000</pubDate>
		<dc:creator>gusortiz</dc:creator>
				<category><![CDATA[Gem]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://gusortiz.wordpress.com/?p=113</guid>
		<description><![CDATA[http://github.com/innetra/acts_as_seekable A common problem most of us have when creating an application is adding search methods. Some times we need to allow users to perform a search involving order paramaters, filter and a free text input for keywords or person name in case you are perfoming people search. Rails it self provided us with some [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gusortiz.wordpress.com&amp;blog=5112615&amp;post=113&amp;subd=gusortiz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong><a href="http://github.com/innetra/acts_as_seekable">http://github.com/innetra/acts_as_seekable</a></strong><br />
A common problem most of us have when creating an application is adding search methods. Some times we need to allow users to perform a search involving order paramaters, filter and a free text input for keywords or person name in case you are perfoming people search.<br />
Rails it self provided us with some cool tools to do this, named scopes are very usefull since you can chain them to get better results, a good example would be Person.doctor.retired returning a collection of Retired Doctors (if we got those named_scopes defined).<br />
So a few days ago I created a small plugin that adds a &#8220;seek&#8221; method to all the models you need. This seek method will recieve a hash as parameter, in this hash should look like this:<br />
{:filter =&gt; &#8216;named_scope_name_for_filter&#8217;, :search =&gt; &#8216;Text to search&#8217;, <img src='http://s1.wp.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> rder =&gt; &#8216;column ORDER&#8217; }</p>
<p>Here is a small example:<br />
<em>db/migrate/XXXXXXXX_create_people.rb</em><br />
<code><br />
class CreatePeople &lt; ActiveRecord::Migration<br />
def self.up<br />
    create_table :people do |t|<br />
      t.string :name<br />
      t.integer :age<br />
      t.boolean :retired<br />
      t.string :profession<br />
      t.timestamps<br />
     end<br />
   end<br />
  def self.down<br />
   drop_table :people<br />
  end<br />
end</code></p>
<p><em>app/models/person.rb</em><br />
<code>class Person &lt; ActiveRecord::Base<br />
  acts_as_seekable :paginate =&gt; true<br />
  named_scope :doctor, :conditions =&gt; {:profession =&gt; 'Doctor'}<br />
  named_scope :retired, :conditions =&gt; {:retired =&gt; true}<br />
  named_scope :elder, :conditions =&gt; {:age =&gt; 70..200}<br />
end<br />
</code><br />
<em>app/controllers/people_controller.rb</em><br />
<code>class PeopleController &lt; ActionController::Base<br />
 def index<br />
   @people = Person.seek(params)<br />
 end<br />
end<br />
</code><br />
The plugin/gem can be found at <strong><a href="http://github.com/innetra/acts_as_seekable">http://github.com/innetra/acts_as_seekable</a></strong>.<br />
A better example can be found at http://github.com/gusortiz/acts_as_seekable_example<br />
clone it, test it, do whatever you want with it.</p>
<p>Enjoy<br />
Leave comments please, that way I know I&#8217;m not talking to the wall. :O</p>
<br />Posted in Gem, Ruby, Ruby on Rails  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gusortiz.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gusortiz.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gusortiz.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gusortiz.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gusortiz.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gusortiz.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gusortiz.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gusortiz.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gusortiz.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gusortiz.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gusortiz.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gusortiz.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gusortiz.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gusortiz.wordpress.com/113/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gusortiz.wordpress.com&amp;blog=5112615&amp;post=113&amp;subd=gusortiz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gusortiz.wordpress.com/2009/05/05/ruby-on-rails-custom-search-with-act_as_seekable-gem-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/91d8c8b7b0d5e04fe46cd8063c31427a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gusortiz</media:title>
		</media:content>
	</item>
		<item>
		<title>Ruby: Convertir Números en Palabras (Cantidad con Letra)</title>
		<link>http://gusortiz.wordpress.com/2009/02/05/gem-para-transforma-numerocantidad-a-letrastexto-en-ruby/</link>
		<comments>http://gusortiz.wordpress.com/2009/02/05/gem-para-transforma-numerocantidad-a-letrastexto-en-ruby/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 23:17:19 +0000</pubDate>
		<dc:creator>gusortiz</dc:creator>
				<category><![CDATA[Gem]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Gems]]></category>
		<category><![CDATA[number to words]]></category>

		<guid isPermaLink="false">http://gusortiz.wordpress.com/?p=91</guid>
		<description><![CDATA[Cierto día en el trabajo nos pusimos a hacer un pequeño gem que le hace un override a la clase Numeric de Ruby, agregando un método de instancia to_words que entrega el número en texto. El número puede estar entre 0 y 9 quintillones (como si realmente necesitaras esta cantidad ). Esta hecho para que [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gusortiz.wordpress.com&amp;blog=5112615&amp;post=91&amp;subd=gusortiz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Cierto día en el trabajo nos pusimos a hacer un pequeño gem que le hace un override a la clase Numeric de Ruby, agregando un método de instancia to_words que entrega el número en texto. El número puede estar entre 0 y 9 quintillones (como si realmente necesitaras esta cantidad <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  ). Esta hecho para que lo escriba en español de la siguiente forma:<br />
<code>$ irb(main):001:0&gt; require 'rubygems'</code><br />
<code>$ =&gt; true</code><br />
<code>$ irb(main):002:0&gt; require 'number_to_words'</code><br />
<code>$ =&gt; true</code><br />
<code>$ irb(main):003:0&gt; 5678.to_words</code><br />
<code>$ =&gt; "cinco mil seiscientos setenta y ocho"</code></p>
<p>Y para que te sirva para un cheque, osea para uso monetario&#8230;.</p>
<p><code>$ irb(main) :004:0&gt; number = 4567.90</code><br />
<code>$ =&gt; 4567.9</code><br />
<code>$ irb(main):005:0&gt; number.to_words.capitalize &lt;&lt; " pesos " &lt;&lt; (number.to_s.split(".")[1] || 0).rjust(2,'0')&lt;&lt; "/100 M.N."</code><br />
<code>$ =&gt; "Cuatro mil quinientos sesenta y siete pesos 09/100 M.N."</code></p>
<p> Hasta el momento nos ha funcionado a la perfección.<br />
Para instalarlo y usarlo hechenle un ojo al sitio de github <a href="http://github.com/innetra/number_to_words/tree/master">http://github.com/innetra/number_to_words/tree/master</a>.</p>
<p>Si le encuentran defectos, errores o se les ocurre una mejora dejenme saber para ver si se incluye. Espero les sirva. Saludos.<br />
<a href="http://www.workingwithrails.com/recommendation/new/person/15551-gustavo-adrian-ortiz-monroy"><img alt="Recommend Me" src="http://workingwithrails.com/images/tools/compact-small-button.jpg" /></a></p>
<br />Posted in Gem, Ruby, Ruby on Rails Tagged: Gems, number to words, Ruby, Ruby on Rails <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gusortiz.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gusortiz.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gusortiz.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gusortiz.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gusortiz.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gusortiz.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gusortiz.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gusortiz.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gusortiz.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gusortiz.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gusortiz.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gusortiz.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gusortiz.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gusortiz.wordpress.com/91/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gusortiz.wordpress.com&amp;blog=5112615&amp;post=91&amp;subd=gusortiz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gusortiz.wordpress.com/2009/02/05/gem-para-transforma-numerocantidad-a-letrastexto-en-ruby/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/91d8c8b7b0d5e04fe46cd8063c31427a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gusortiz</media:title>
		</media:content>

		<media:content url="http://workingwithrails.com/images/tools/compact-small-button.jpg" medium="image">
			<media:title type="html">Recommend Me</media:title>
		</media:content>
	</item>
		<item>
		<title>auto_complete en Ruby on Rails</title>
		<link>http://gusortiz.wordpress.com/2009/01/14/auto_complete-en-ruby-on-rails/</link>
		<comments>http://gusortiz.wordpress.com/2009/01/14/auto_complete-en-ruby-on-rails/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 15:40:35 +0000</pubDate>
		<dc:creator>gusortiz</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[auto_complete]]></category>

		<guid isPermaLink="false">http://gusortiz.wordpress.com/?p=89</guid>
		<description><![CDATA[Esto solía ser nativo de rails en las primeras versiones, sin embargo, a partir de la 2.0 si mal no recuerdo, fue extraido a un plugin. Este plugin esta muy bueno para auto completar text_fields en formularios. Para usarlo primero hay que instalarlo, asi que desde la carpeta vendor/plugins de nuestra aplicación rails: $ git [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gusortiz.wordpress.com&amp;blog=5112615&amp;post=89&amp;subd=gusortiz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Esto solía ser nativo de rails en las primeras versiones, sin embargo, a partir de la 2.0 si mal no recuerdo, fue extraido a un plugin. Este plugin esta muy bueno para auto completar text_fields en formularios.<br />
Para usarlo primero hay que instalarlo, asi que desde la carpeta vendor/plugins de nuestra aplicación rails:<br />
<code>$ git clone git://github.com/rails/auto_complete.git</code><br />
<code>$ rm -rf auto_complete/.git </code><br />
O bien desde la carpeta root de tu proyecto Rails.<br />
<code>$ ./srcipt/plugin install git://github.com/rails/auto_complete.git</code></p>
<p>Para ver buenos ejemplos de como usar este plugin recomiendo ver el capítulo 102 en <a href="http://railscasts.com">Railscasts.com</a> y el ejemplo que D.H.H. puso aqui <a href="http://github.com/rails/auto_complete/tree/master">http://github.com/rails/auto_complete/tree/master</a></p>
<p>Ahi lo tienen.<br />
Comentarios, preguntas, dudas e insultos son bienvenidos, dejen un mensaje.<br />
<a href="http://www.workingwithrails.com/recommendation/new/person/15551-gustavo-adrian-ortiz-monroy"><img alt="Recommend Me" src="http://workingwithrails.com/images/tools/compact-small-button.jpg" /></a></p>
<br />Posted in Ruby on Rails Tagged: ajax, auto_complete, Ruby on Rails <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gusortiz.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gusortiz.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gusortiz.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gusortiz.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gusortiz.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gusortiz.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gusortiz.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gusortiz.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gusortiz.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gusortiz.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gusortiz.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gusortiz.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gusortiz.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gusortiz.wordpress.com/89/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gusortiz.wordpress.com&amp;blog=5112615&amp;post=89&amp;subd=gusortiz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gusortiz.wordpress.com/2009/01/14/auto_complete-en-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/91d8c8b7b0d5e04fe46cd8063c31427a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gusortiz</media:title>
		</media:content>

		<media:content url="http://workingwithrails.com/images/tools/compact-small-button.jpg" medium="image">
			<media:title type="html">Recommend Me</media:title>
		</media:content>
	</item>
		<item>
		<title>Sending mail smtp gmail, with attachment using Ruby on Rails: ActionMailer</title>
		<link>http://gusortiz.wordpress.com/2009/01/05/sending-mail-smtp-gmail-with-attachment-using-ruby-on-rails-actionmailer/</link>
		<comments>http://gusortiz.wordpress.com/2009/01/05/sending-mail-smtp-gmail-with-attachment-using-ruby-on-rails-actionmailer/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 19:54:01 +0000</pubDate>
		<dc:creator>gusortiz</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://gusortiz.wordpress.com/?p=76</guid>
		<description><![CDATA[Ruby on rails has a native class to send email. It may look easy but it can get confusing when you have to configure your rails app to manage this. All the configuration must be in the environment.rb file or in any specific environment file ( development.rb, production.rb, test.rb), however I sugest using environmet.rb so [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gusortiz.wordpress.com&amp;blog=5112615&amp;post=76&amp;subd=gusortiz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ruby on rails has a native class to send email. It may look easy but it can get confusing when you have to configure your rails app to manage this.<br />
All the configuration must be in the environment.rb file or in any specific environment file ( development.rb, production.rb, test.rb), however I sugest using environmet.rb so you won&#8217;t have to repeat configuration.</p>
<p>All the information on configuration is at <a href="http://api.rubyonrails.org">http://api.rubyonrails.org</a> but here is an example using gmail.</p>
<p><em>config/environment.rb</em><br />
<code>  config.action_mailer.delivery_method = :smtp</code></p>
<p><code>  # I do care if the mailer can't send</code><br />
<code>  config.action_mailer.raise_delivery_errors = true</code></p>
<p><code>  # Include your app's configuration here:</code><br />
<code>  config.action_mailer.smtp_settings = {</code><br />
<code>    :address =&gt; "smtp.gmail.com",</code><br />
<code>    :port =&gt; "587",</code><br />
<code>    :domain =&gt; "my_app_domain", #Example: blog.local</code><br />
<code>    :authentication =&gt; :plain,</code><br />
<code>    :user_name =&gt; "my.gmail.account",</code><br />
<code>    :password =&gt; "th1s1s4l33tpwd!"</code><br />
<code>  }</code></p>
<p>That is all the configuration to send the mail, now you need to create your mailer.<br />
<code> $ script/generate mailer my_mailer</code></p>
<p>Write all the logic of this mailer on the &#8220;model&#8221; my_mailer.rb, here is an example that also sends an attachment, I asume that you have a user model or a person model, this model should have a field name and email:</p>
<p><em>app/models/my_mailer.rb</em><br />
<code>class MyMailer &lt; ActionMailer::Base</code></p>
<p><code>  def email(recipient)</code><br />
<code>   recipients recipient.email</code><br />
<code>   from "my.gmail.account@gmail.com"</code><br />
<code>   subject "This is a test mail"</code><br />
<code>   body :user =&gt; recipient # Im sending the recipient object as a local variable in a partial, but you will access it as an instance variable</code></p>
<p><code>   @file_name = "#{RAILS_ROOT}/public/attachment.txt"</code><br />
<code>   create_attachment</code><br />
<code>   attachment :content_type =&gt; "text/plain",</code><br />
<code>    :filename =&gt; "Some useless attachment",</code><br />
<code>    :body =&gt; File.read(@file_name)</code><br />
<code>   delete_attachment_file</code><br />
<code>  end</code></p>
<p><code>  protected</code><br />
<code>  def create_attachment</code><br />
<code>    attachment = File.new(@file_name, 'w')</code><br />
<code>    attachment.puts "I am a useless text file"</code><br />
<code>    attachment.puts " C(0_0)D "</code><br />
<code>    attachment.close</code><br />
<code>  end</code></p>
<p><code>  def delete_attachment_file</code><br />
<code>    File.delete(@file_name)</code><br />
<code>  end</code><br />
<code>end</code></p>
<p>Now let&#8217;s make a view for the mail layout. This view will define the body or content of your mail.<br />
So now you need to create a file named email.erb this is because our method that sends the mail is named email, so this basically works as the views for the controller actions. Create your file under views/my_mailer. Here is an example that uses the local variable user that I send from the email method.</p>
<p><em>app/views/my_mailer/email.erb</em><br />
<code></code><br />
<code>Hello  . I have an attachment for you <img src='http://s2.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </code></p>
<p>Ok now you have almost everything done, but we still have to call our email method. This is done using a dynamic method deliver_my_method_name(param_1, param_2, &#8230;, param_n)</p>
<p>This is an example of this dynamic method called from the person model.</p>
<p><em>app/models/person.rb</em><br />
<code>class Person &lt; ActiveRecord::Base</code><br />
<code>  def send_email</code><br />
<code>     MyMailer.deliver_email(self) # I am sending the person as a parameter.</code><br />
<code>  end</code><br />
<code>end</code></p>
<p>One last thing, to send email using accounts that need tsl like gmail you need some libraries that will give you extra methods. What i did to solve this was to create a lib file in my Rails application under the lib directory ( I know this is obvious but i have to be specific <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  ). This is the code of that file, I found this code googling and I just copied it into my app, it works for me and I hope it&#8217;ll work for you:</p>
<p><em>lib/smtp_tsl.rb</em><br />
<code>require "openssl"</code><br />
<code>require "net/smtp"</code></p>
<p><code>Net::SMTP.class_eval do</code><br />
  private<br />
<code>  def do_start(helodomain, user, secret, authtype)</code><br />
<code>    raise IOError, 'SMTP session already started' if @started</code><br />
<code>if RUBY_VERSION == "1.8.7"</code><br />
      <code>check_auth_args user, secret if user or secret</code><br />
   <code> else</code><br />
      <code>check_auth_args user, secret, authtype if user or secret</code><br />
   <code> end</code></p>
<p><code>    sock = timeout(@open_timeout) { TCPSocket.open(@address, @port) }</code><br />
<code>    @socket = Net::InternetMessageIO.new(sock)</code><br />
<code>    @socket.read_timeout = 60 #@read_timeout</code><br />
<code>    #@socket.debug_output = STDERR #@debug_output</code></p>
<p><code>    check_response(critical { recv_response() })</code><br />
<code>    do_helo(helodomain)<br />
</code><br />
<code>    if starttls</code><br />
<code>      raise 'openssl library not installed' unless defined?(OpenSSL)</code><br />
<code>      ssl = OpenSSL::SSL::SSLSocket.new(sock)</code><br />
<code>      ssl.sync_close = true</code><br />
<code>      ssl.connect</code><br />
<code>      @socket = Net::InternetMessageIO.new(ssl)</code><br />
<code>      @socket.read_timeout = 60 #@read_timeout</code><br />
<code>      #@socket.debug_output = STDERR #@debug_output</code><br />
<code>      do_helo(helodomain)</code><br />
<code>    end</code></p>
<p><code>    authenticate user, secret, authtype if user</code><br />
<code>    @started = true</code><br />
<code>  ensure</code><br />
<code>    unless @started</code><br />
<code>      # authentication failed, cancel connection.</code><br />
<code>      @socket.close if not @started and @socket and not @socket.closed?</code><br />
<code>      @socket = nil</code><br />
<code>    end</code><br />
<code>  end</code></p>
<p><code>  def do_helo(helodomain)</code><br />
<code>     begin</code><br />
<code>      if @esmtp</code><br />
<code>        ehlo helodomain</code><br />
<code>      else</code><br />
<code>        helo helodomain</code><br />
<code>      end</code><br />
<code>    rescue Net::ProtocolError</code><br />
<code>      if @esmtp</code><br />
<code>        @esmtp = false</code><br />
<code>        @error_occured = false</code><br />
<code>        retry</code><br />
<code>      end</code><br />
<code>      raise</code><br />
<code>    end</code><br />
<code>  end</code></p>
<p><code>  def starttls</code><br />
<code>    getok('STARTTLS') rescue return false</code><br />
<code>    return true</code><br />
<code>  end</code></p>
<p><code>  def quit</code><br />
<code>    begin</code><br />
<code>      getok('QUIT')</code><br />
<code>    rescue EOFError, OpenSSL::SSL::SSLError</code><br />
<code>    end</code><br />
<code>  end</code><br />
<code>end</code></p>
<p>Enjoy. Leave me a comment if you see anything funny, annoying, cool or just to say hello.<br />
<a href="http://www.workingwithrails.com/recommendation/new/person/15551-gustavo-adrian-ortiz-monroy"><img alt="Recommend Me" src="http://workingwithrails.com/images/tools/compact-small-button.jpg" /></a></p>
<br />Posted in Ruby on Rails Tagged: Email, Ruby, Ruby on Rails <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gusortiz.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gusortiz.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gusortiz.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gusortiz.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gusortiz.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gusortiz.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gusortiz.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gusortiz.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gusortiz.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gusortiz.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gusortiz.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gusortiz.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gusortiz.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gusortiz.wordpress.com/76/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gusortiz.wordpress.com&amp;blog=5112615&amp;post=76&amp;subd=gusortiz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gusortiz.wordpress.com/2009/01/05/sending-mail-smtp-gmail-with-attachment-using-ruby-on-rails-actionmailer/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/91d8c8b7b0d5e04fe46cd8063c31427a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gusortiz</media:title>
		</media:content>

		<media:content url="http://workingwithrails.com/images/tools/compact-small-button.jpg" medium="image">
			<media:title type="html">Recommend Me</media:title>
		</media:content>
	</item>
		<item>
		<title>Pruebas con Ruby on Rails&#8230; para novatos.</title>
		<link>http://gusortiz.wordpress.com/2008/12/03/pruebas-con-ruby-on-rails-para-novatos/</link>
		<comments>http://gusortiz.wordpress.com/2008/12/03/pruebas-con-ruby-on-rails-para-novatos/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 23:43:53 +0000</pubDate>
		<dc:creator>gusortiz</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Ruby Gems]]></category>

		<guid isPermaLink="false">http://gusortiz.wordpress.com/?p=72</guid>
		<description><![CDATA[Ruby on Rails viene con un conjunto de herramientas bastante útiles para realizar pruebas. Para poder empezar a probar necesitas seguir estos pasos: Primero debes crear la base de datos de prueba, por default estas en el ambiente de desarrollo y no necesariamente quieres cambiarte de ambiente cada que vas a hacer pruebas, asi que [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gusortiz.wordpress.com&amp;blog=5112615&amp;post=72&amp;subd=gusortiz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ruby on Rails viene con un conjunto de herramientas bastante útiles para realizar pruebas.<br />
Para poder empezar a probar necesitas seguir estos pasos:</p>
<ol>
<li>Primero debes crear la base de datos de prueba, por default estas en el ambiente de desarrollo y no necesariamente quieres cambiarte de ambiente cada que vas a hacer pruebas, asi que podrías hacerlo de esta manera:  <code>$ rake db:create RAILS_ENV=test</code></li>
<li>Una vez creada, necesitas hacerle las migraciones: <code>$ rake db:migrate RAILS_ENV=test</code></li>
</ol>
<p>Existen mejores métodos de hacer esto, y muchas cosas más. Para conseguir mas datos sobre las pruebas revisa <a href="http://guides.rubyonrails.org/testing_rails_applications.html"> esta guía dando click aqui</a>, ahi encontraras mucha más información.</p>
<p>Sugiero el uso de autotest, para hacer el proceso de pruebas más rápido y fácil, lo que autotest hace es correr las pruebas en segundo plano cada que detecta un cambio en tus archivos de test.<br />
Para instalar autotest solo teclea esto en tu terminal:<br />
<code>$ gem install ZenTest</code><br />
Y para ponerlo a probar:<br />
<code>$ autotest - -rails</code></p>
<p>En este sitio hay un screencast de autotest <a href="http://nubyonrails.com/articles/autotest-rails">http://nubyonrails.com/articles/autotest-rails</a> existe también un railscast en  <a href="http://railscasts.com">railscasts.com</a> el número 11 para ser exactos, en el que se hace un refactoring y utiliza autotest para realizar sus pruebas. </p>
<p>Ahí lo tienen.<br />
<a href="http://www.workingwithrails.com/recommendation/new/person/15551-gustavo-adrian-ortiz-monroy"><img alt="Recommend Me" src="http://workingwithrails.com/images/tools/compact-small-button.jpg" /></a></p>
<br />Posted in Ruby Gems, Ruby on Rails  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gusortiz.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gusortiz.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gusortiz.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gusortiz.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gusortiz.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gusortiz.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gusortiz.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gusortiz.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gusortiz.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gusortiz.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gusortiz.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gusortiz.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gusortiz.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gusortiz.wordpress.com/72/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gusortiz.wordpress.com&amp;blog=5112615&amp;post=72&amp;subd=gusortiz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gusortiz.wordpress.com/2008/12/03/pruebas-con-ruby-on-rails-para-novatos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/91d8c8b7b0d5e04fe46cd8063c31427a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gusortiz</media:title>
		</media:content>

		<media:content url="http://workingwithrails.com/images/tools/compact-small-button.jpg" medium="image">
			<media:title type="html">Recommend Me</media:title>
		</media:content>
	</item>
		<item>
		<title>How to&#8230; Rails Testing for noobies</title>
		<link>http://gusortiz.wordpress.com/2008/12/03/how-to-rails-testing-for-noobies/</link>
		<comments>http://gusortiz.wordpress.com/2008/12/03/how-to-rails-testing-for-noobies/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 22:58:14 +0000</pubDate>
		<dc:creator>gusortiz</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Ruby Gems]]></category>

		<guid isPermaLink="false">http://gusortiz.wordpress.com/?p=70</guid>
		<description><![CDATA[Ruby on Rails comes with very nice testing tools. Use them! In order to get your test working follow the next steps: First create and set up your testing database, remember that by default you are working under a development environmet so.. if you dont want to lose this configuration, and still test on the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gusortiz.wordpress.com&amp;blog=5112615&amp;post=70&amp;subd=gusortiz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ruby on Rails comes with very nice testing tools. Use them!<br />
In order to get your test working follow the next steps:</p>
<ol>
<li>First create and set up your testing database, remember that by default you are working under a development environmet so.. if you dont want to lose this configuration, and still test on the same computer you are developing just specify that you will run db:create rake task for test env just like this:  <code>$ rake db:create RAILS_ENV=test</code></li>
<li>After your database is created run all migrations using the same &#8220;hack&#8221;: <code>$ rake db:migrate RAILS_ENV=test</code></li>
</ol>
<p>There are better ways to this, remember this is just a spank on your but to get you started.<br />
For more information refer to <a href="http://guides.rubyonrails.org/testing_rails_applications.html"> this guide by clicking here</a>, there you will find all you need to test like a pro.</p>
<p>I sugest you use the autotest gem to make it easier for you to test, specially on code refactorings.<br />
Install auto test by running:<br />
<code>$ gem install ZenTest</code><br />
Use it by running:<br />
<code>$ autotest - -rails</code></p>
<p>Check this site out for a screencast on autotest <a href="http://nubyonrails.com/articles/autotest-rails">http://nubyonrails.com/articles/autotest-rails</a> theres also a cool railscast for this topic on <a href="http://railscasts.com">railscasts.com</a> look for the 11th one.<br />
Enjoy.<br />
<a href="http://www.workingwithrails.com/recommendation/new/person/15551-gustavo-adrian-ortiz-monroy"><img alt="Recommend Me" src="http://workingwithrails.com/images/tools/compact-small-button.jpg" /></a></p>
<br />Posted in Ruby Gems, Ruby on Rails  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gusortiz.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gusortiz.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gusortiz.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gusortiz.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gusortiz.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gusortiz.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gusortiz.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gusortiz.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gusortiz.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gusortiz.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gusortiz.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gusortiz.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gusortiz.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gusortiz.wordpress.com/70/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gusortiz.wordpress.com&amp;blog=5112615&amp;post=70&amp;subd=gusortiz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gusortiz.wordpress.com/2008/12/03/how-to-rails-testing-for-noobies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/91d8c8b7b0d5e04fe46cd8063c31427a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gusortiz</media:title>
		</media:content>

		<media:content url="http://workingwithrails.com/images/tools/compact-small-button.jpg" medium="image">
			<media:title type="html">Recommend Me</media:title>
		</media:content>
	</item>
		<item>
		<title>Problemas instalando el mysql gem en Ubuntu</title>
		<link>http://gusortiz.wordpress.com/2008/11/25/problemas-instalando-el-mysql-gem-en-ubuntu/</link>
		<comments>http://gusortiz.wordpress.com/2008/11/25/problemas-instalando-el-mysql-gem-en-ubuntu/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 17:06:59 +0000</pubDate>
		<dc:creator>gusortiz</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Ruby Gems]]></category>
		<category><![CDATA[Add new tag]]></category>

		<guid isPermaLink="false">http://gusortiz.wordpress.com/?p=55</guid>
		<description><![CDATA[La situacion es que actualizaste tu Ruby on Rails, o instalaste la nueva versión y te diste cuenta de que necesita el gem de mysql instalado para funcionar. Entonces abriste tu constola y escribiste: $ sudo gem install mysql. Pero entonces obtuviste un bonito error: ERROR: While executing gem &#8230; (RuntimeError) ERROR: Failed to build [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gusortiz.wordpress.com&amp;blog=5112615&amp;post=55&amp;subd=gusortiz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>La situacion es que actualizaste tu Ruby on Rails, o instalaste la nueva versión y te diste cuenta de que necesita el gem de mysql instalado para funcionar. Entonces abriste tu constola y escribiste:<br />
<code>$ sudo gem install mysql</code>.<br />
Pero entonces obtuviste un bonito error:</p>
<blockquote><p>ERROR:  While executing gem &#8230; (RuntimeError)<br />
    ERROR: Failed to build gem native extension.<br />
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection.</p></blockquote>
<p>El problema está en que el gem de mysql necesita el paquete de desarrollo de mysql para compilar y asi poder instalarse, asi que sólo debes instalarlo primero:<br />
<code>$ sudo apt-get install libmysqlclient15-dev</code><br />
Ya que lo tienes vuelve a intentar obtener el gem:<br />
<code>$ sudo gem install mysql</code>.<br />
Y listo ya quedo. Ahora puede pasar que el gem no pueda instalarse aun después de esto debido a que no hay espacio suficiente en la carpeta /tmp para escibir, si te pasa esto, reinicia para que se libere el<br />
espacio que necesitas sin eliminar nada que puedas necesitar, vuelves a intentar y ya.</p>
<p>Ahí lo tienen.<br />
<a href="http://www.workingwithrails.com/recommendation/new/person/15551-gustavo-adrian-ortiz-monroy"><img alt="Recommend Me" src="http://workingwithrails.com/images/tools/compact-small-button.jpg" /></a></p>
<br />Posted in Ruby Gems, Ruby on Rails Tagged: Add new tag <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gusortiz.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gusortiz.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gusortiz.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gusortiz.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gusortiz.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gusortiz.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gusortiz.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gusortiz.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gusortiz.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gusortiz.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gusortiz.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gusortiz.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gusortiz.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gusortiz.wordpress.com/55/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gusortiz.wordpress.com&amp;blog=5112615&amp;post=55&amp;subd=gusortiz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gusortiz.wordpress.com/2008/11/25/problemas-instalando-el-mysql-gem-en-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/91d8c8b7b0d5e04fe46cd8063c31427a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gusortiz</media:title>
		</media:content>

		<media:content url="http://workingwithrails.com/images/tools/compact-small-button.jpg" medium="image">
			<media:title type="html">Recommend Me</media:title>
		</media:content>
	</item>
		<item>
		<title>Problems installing mysql gem Ubuntu</title>
		<link>http://gusortiz.wordpress.com/2008/11/25/problems-installing-mysql-gem-ubuntu/</link>
		<comments>http://gusortiz.wordpress.com/2008/11/25/problems-installing-mysql-gem-ubuntu/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 16:43:51 +0000</pubDate>
		<dc:creator>gusortiz</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Ruby Gems]]></category>

		<guid isPermaLink="false">http://gusortiz.wordpress.com/?p=52</guid>
		<description><![CDATA[Well here&#8217;s the deal, after updating Ruby on Rails you realized it actually needs the mysql gem installed to work. So you went to your console and typed: $ sudo gem install mysql. But then you got some nice error: ERROR: While executing gem &#8230; (RuntimeError) ERROR: Failed to build gem native extension. Gem files [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gusortiz.wordpress.com&amp;blog=5112615&amp;post=52&amp;subd=gusortiz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Well here&#8217;s the deal, after updating Ruby on Rails you realized it actually needs the mysql gem installed to work. So you went to your console and typed:<br />
<code>$ sudo gem install mysql</code>.<br />
But then you got some nice error:</p>
<blockquote><p>ERROR:  While executing gem &#8230; (RuntimeError)<br />
    ERROR: Failed to build gem native extension.<br />
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection.</p></blockquote>
<p>Well the thing is that this gem needs the dev packages to compile and install so you got to install the mysql dev library:<br />
<code>$ sudo apt-get install libmysqlclient15-dev</code><br />
Now lets go back to our gem installation:<br />
<code>$ sudo gem install mysql</code>.<br />
There you go, your mysql gem is now installed properly.<br />
Enjoy.<br />
<a href="http://www.workingwithrails.com/recommendation/new/person/15551-gustavo-adrian-ortiz-monroy"><img alt="Recommend Me" src="http://workingwithrails.com/images/tools/compact-small-button.jpg" /></a></p>
<br />Posted in Ruby Gems, Ruby on Rails  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gusortiz.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gusortiz.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gusortiz.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gusortiz.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gusortiz.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gusortiz.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gusortiz.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gusortiz.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gusortiz.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gusortiz.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gusortiz.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gusortiz.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gusortiz.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gusortiz.wordpress.com/52/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gusortiz.wordpress.com&amp;blog=5112615&amp;post=52&amp;subd=gusortiz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gusortiz.wordpress.com/2008/11/25/problems-installing-mysql-gem-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/91d8c8b7b0d5e04fe46cd8063c31427a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gusortiz</media:title>
		</media:content>

		<media:content url="http://workingwithrails.com/images/tools/compact-small-button.jpg" medium="image">
			<media:title type="html">Recommend Me</media:title>
		</media:content>
	</item>
		<item>
		<title>Guia completa de Ruby on Rails para principiantes</title>
		<link>http://gusortiz.wordpress.com/2008/11/24/guia-competa-de-ruby-on-rails-para-principiantes/</link>
		<comments>http://gusortiz.wordpress.com/2008/11/24/guia-competa-de-ruby-on-rails-para-principiantes/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 22:36:52 +0000</pubDate>
		<dc:creator>gusortiz</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://gusortiz.wordpress.com/?p=50</guid>
		<description><![CDATA[Apoco se la creyeron que les iba a escribir todo eso aqui.. ja ja. Mejor los mando por el buen camino porque esas guías ya están hechas: http://guides.rubyonrails.org/ Ahi encuentran todo lo necesario para empezar de cero. Ya que esten mas preparados, dense una vuelta por http://railscasts.com donde Ryan Bates los proveera de un puño [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gusortiz.wordpress.com&amp;blog=5112615&amp;post=50&amp;subd=gusortiz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Apoco se la creyeron que les iba a escribir todo eso aqui.. ja ja.<br />
Mejor los mando por el buen camino porque esas guías ya están hechas:<br />
<a href="http://guides.rubyonrails.org/">http://guides.rubyonrails.org/</a> Ahi encuentran todo lo necesario para empezar de cero. Ya que esten mas preparados, dense una vuelta por  <a href="http://railscasts.com">http://railscasts.com</a> donde Ryan Bates los proveera de un puño de videos que explican un montón de cosas interesantes, tips y otros datos más avanzados.<br />
 Ahí lo tienen.<br />
<a href="http://www.workingwithrails.com/recommendation/new/person/15551-gustavo-adrian-ortiz-monroy"><img alt="Recommend Me" src="http://workingwithrails.com/images/tools/compact-small-button.jpg" /></a></p>
<br />Posted in Ruby on Rails  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gusortiz.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gusortiz.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gusortiz.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gusortiz.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gusortiz.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gusortiz.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gusortiz.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gusortiz.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gusortiz.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gusortiz.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gusortiz.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gusortiz.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gusortiz.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gusortiz.wordpress.com/50/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gusortiz.wordpress.com&amp;blog=5112615&amp;post=50&amp;subd=gusortiz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gusortiz.wordpress.com/2008/11/24/guia-competa-de-ruby-on-rails-para-principiantes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/91d8c8b7b0d5e04fe46cd8063c31427a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gusortiz</media:title>
		</media:content>

		<media:content url="http://workingwithrails.com/images/tools/compact-small-button.jpg" medium="image">
			<media:title type="html">Recommend Me</media:title>
		</media:content>
	</item>
		<item>
		<title>Ruby on Rails getting started full guide</title>
		<link>http://gusortiz.wordpress.com/2008/11/24/ruby-on-rails-getting-started-full-guide/</link>
		<comments>http://gusortiz.wordpress.com/2008/11/24/ruby-on-rails-getting-started-full-guide/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 22:33:09 +0000</pubDate>
		<dc:creator>gusortiz</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://gusortiz.wordpress.com/?p=48</guid>
		<description><![CDATA[What!? You expect me to write a full guide to this?. Nah, I better point out the right direction: http://guides.rubyonrails.org/ is the place to go. And after that if you want to go more advanced and see some cool tips pay a visit to our friend Ryan Bates at http://railscasts.com. Enjoy. Posted in Ruby on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gusortiz.wordpress.com&amp;blog=5112615&amp;post=48&amp;subd=gusortiz&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>What!? You expect me to write a full guide to this?.<br />
Nah, I better point out the right direction: <a href="http://guides.rubyonrails.org/">http://guides.rubyonrails.org/</a> is the place to go. And after that if you want to go more advanced and  see some cool tips pay a visit to our friend Ryan Bates at <a href="http://railscasts.com">http://railscasts.com</a>.<br />
 Enjoy.<br />
<a href="http://www.workingwithrails.com/recommendation/new/person/15551-gustavo-adrian-ortiz-monroy"><img alt="Recommend Me" src="http://workingwithrails.com/images/tools/compact-small-button.jpg" /></a></p>
<br />Posted in Ruby on Rails  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gusortiz.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gusortiz.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gusortiz.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gusortiz.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gusortiz.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gusortiz.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gusortiz.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gusortiz.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gusortiz.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gusortiz.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gusortiz.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gusortiz.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gusortiz.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gusortiz.wordpress.com/48/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gusortiz.wordpress.com&amp;blog=5112615&amp;post=48&amp;subd=gusortiz&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gusortiz.wordpress.com/2008/11/24/ruby-on-rails-getting-started-full-guide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/91d8c8b7b0d5e04fe46cd8063c31427a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gusortiz</media:title>
		</media:content>

		<media:content url="http://workingwithrails.com/images/tools/compact-small-button.jpg" medium="image">
			<media:title type="html">Recommend Me</media:title>
		</media:content>
	</item>
	</channel>
</rss>
