<?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/"
	>

<channel>
	<title>42 &#187; development</title>
	<atom:link href="http://www.42.mach7x.com/tag/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.42.mach7x.com</link>
	<description>Thoughts and tips about programming with Ruby on Rails</description>
	<lastBuildDate>Wed, 01 Feb 2012 14:38:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Testing Active_Mailer with GMail in development</title>
		<link>http://www.42.mach7x.com/2010/09/22/testing-active_mailer-with-gmail-in-development/</link>
		<comments>http://www.42.mach7x.com/2010/09/22/testing-active_mailer-with-gmail-in-development/#comments</comments>
		<pubDate>Wed, 22 Sep 2010 15:55:35 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[2.3.2]]></category>
		<category><![CDATA[Active_Mailer]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[GMail]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=231</guid>
		<description><![CDATA[Problem You want to test your email configuration and be able to send emails in your development environment, using a GMail account in a Rails application using 2.3.2. Solution Start your console in your development environment: ./script/console Add the following replacing your GMail details: ActionMailer::Base.smtp_settings = { :enable_starttls_auto => true, :address => "smtp.gmail.com", :port => [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
You want to test your email configuration and be able to send emails in your development environment, using a GMail account in a Rails application using 2.3.2.</p>
<p><strong>Solution</strong><br />
Start your console in your development environment:<br />
<code><br />
./script/console<br />
</code></p>
<p>Add the following replacing your GMail details:</p>
<p><code><br />
ActionMailer::Base.smtp_settings = {<br />
  :enable_starttls_auto => true,<br />
  :address => "smtp.gmail.com",<br />
  :port => 587,<br />
  :domain => "your_gmail_domain",<br />
  :authentication => :plain,<br />
  :user_name => "your_gmail_user_name",<br />
  :password => "your_gmail_password"}<br />
</code></p>
<p>Add a simple email class:</p>
<p><code><br />
class MyMailer < ActionMailer::Base<br />
  def test_email<br />
    @recipients = "an_address_to_sent_to@domain.com"<br />
    @from = "address_from@your_google_domain.com"<br />
    @subject = "test from dev console"<br />
    @body = "this is the body"<br />
  end<br />
end<br />
</code></p>
<p>and to finally test the email:</p>
<p><code><br />
MyMailer::deliver_test_email<br />
</code></p>
<p>if it doesn't return with an error but with something like:</p>
<p><code><br />
TMail::Mail port=#TMail::StringPort:id=0x..fdab4cee0 bodyport=#TMail::StringPort:id=0x..fdab4a9ec<br />
</code></p>
<p>then it should be working so add the configuration to your environments/development.rb<br />
<code><br />
config.action_mailer.smtp_settings { ... }<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2010/09/22/testing-active_mailer-with-gmail-in-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cap deploy_with_migrations default behaviour</title>
		<link>http://www.42.mach7x.com/2007/11/30/cap-deploy_with_migrations-default-behaviour/</link>
		<comments>http://www.42.mach7x.com/2007/11/30/cap-deploy_with_migrations-default-behaviour/#comments</comments>
		<pubDate>Fri, 30 Nov 2007 10:35:31 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[capistrano]]></category>
		<category><![CDATA[deploy]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[migrations]]></category>
		<category><![CDATA[production]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/2007/11/30/cap-deploy_with_migrations-default-behaviour/</guid>
		<description><![CDATA[Problem When using cap deploy_with_migrations, the default behaviour is to deploy with the migrations in the production environment. Solution To change this behavior add: set :rails_env, "development" in your config/deploy.rb]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
When using <em>cap deploy_with_migrations</em>, the default behaviour is to deploy with the migrations in the production environment.</p>
<p><strong>Solution</strong><br />
To change this behavior add:</p>
<pre class="code">
set  :rails_env,  "development"</pre>
<p>in your config/deploy.rb</p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2007/11/30/cap-deploy_with_migrations-default-behaviour/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

