<?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>7deeds &#187; ruby-on-rails</title>
	<atom:link href="http://blog.7deeds.com/tag/ruby-on-rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.7deeds.com</link>
	<description>Petros Amiridis - A humble programmer's seven noteworthy actions for the community</description>
	<lastBuildDate>Mon, 31 May 2010 12:09:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>MySQL gem doesn&#8217;t work after upgrading Ubuntu</title>
		<link>http://blog.7deeds.com/2010/05/06/mysql-gem-doesnt-work-after-upgrading-ubuntu/</link>
		<comments>http://blog.7deeds.com/2010/05/06/mysql-gem-doesnt-work-after-upgrading-ubuntu/#comments</comments>
		<pubDate>Thu, 06 May 2010 20:54:31 +0000</pubDate>
		<dc:creator>Petros</dc:creator>
				<category><![CDATA[tips]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby-on-rails]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.7deeds.com/?p=423</guid>
		<description><![CDATA[I upgraded Ubuntu 9.10 to 10.04. Everything was cool. I tried to work on a Rails project I am involved by issuing the command rake db:migrate to update the database.
I was getting the following error:

Error: uninitialized constant MysqlCompat::MysqlRes

Then I uninstalled the mysql gem and tried to install it again only to get the following error:

Building [...]]]></description>
			<content:encoded><![CDATA[<p>I upgraded Ubuntu 9.10 to 10.04. Everything was cool. I tried to work on a Rails project I am involved by issuing the command rake db:migrate to update the database.</p>
<p>I was getting the following error:</p>
<pre class="brush: bash;">
Error: uninitialized constant MysqlCompat::MysqlRes
</pre>
<p>Then I uninstalled the mysql gem and tried to install it again only to get the following error:</p>
<pre class="brush: bash;">
Building native extensions. This could take a while...
ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.
</pre>
<p>Then I issued the following command:</p>
<pre class="brush: bash;">
sudo apt-get install libmysqlclient-dev
</pre>
<p>and then installed mysql gem and it installed with no problems. Finally, rake db:migrate worked again.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.7deeds.com/2010/05/06/mysql-gem-doesnt-work-after-upgrading-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails: url vs path</title>
		<link>http://blog.7deeds.com/2009/09/21/rails-url-vs-path/</link>
		<comments>http://blog.7deeds.com/2009/09/21/rails-url-vs-path/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 22:30:44 +0000</pubDate>
		<dc:creator>Petros</dc:creator>
				<category><![CDATA[tips]]></category>
		<category><![CDATA[routes]]></category>
		<category><![CDATA[ruby-on-rails]]></category>
		<category><![CDATA[self-note]]></category>

		<guid isPermaLink="false">http://blog.7deeds.com/?p=331</guid>
		<description><![CDATA[I was wondering why some people are using _path and why some use _url. For example, if you have a Post resource you can write the following in your view:
&#60;%= link_to 'List of posts', posts_path %&#62;
or the following in the controller:
redirect_to posts_url
Why should I use _url in the controller. I have used _path and it [...]]]></description>
			<content:encoded><![CDATA[<p>I was wondering why some people are using _path and why some use _url. For example, if you have a Post resource you can write the following in your view:</p>
<pre class="brush: ruby;">&lt;%= link_to 'List of posts', posts_path %&gt;</pre>
<p>or the following in the controller:</p>
<pre class="brush: ruby;">redirect_to posts_url</pre>
<p>Why should I use _url in the controller. I have used _path and it seems to work.</p>
<p>This is an explanation I found in a forum and I quote:</p>
<blockquote><p>
 *_path are for views because ahrefs are implicitly linked to the current URL. So it&#8217;d be a waste of bytes to repeat it over and over. In the controller, though, *_url is needed for redirect_to because the HTTP specification mandates that the Location: header in 3xx redirects is a complete URL.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.7deeds.com/2009/09/21/rails-url-vs-path/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Volunteering</title>
		<link>http://blog.7deeds.com/2009/09/01/volunteering/</link>
		<comments>http://blog.7deeds.com/2009/09/01/volunteering/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 10:22:35 +0000</pubDate>
		<dc:creator>Petros</dc:creator>
				<category><![CDATA[2-deed]]></category>
		<category><![CDATA[communities]]></category>
		<category><![CDATA[non-profit]]></category>
		<category><![CDATA[open-source]]></category>
		<category><![CDATA[ruby-on-rails]]></category>
		<category><![CDATA[volunteering]]></category>

		<guid isPermaLink="false">http://blog.7deeds.com/?p=346</guid>
		<description><![CDATA[Volunteering to non-profit organizations or to open source software projects is my second deed (2-deed).
I started this activity in June 2009 by becoming a member of Builders, a RailsBridge project, that connects volunteers with projects for 501c3 non-profits.
So far, I am volunteering in two projects: 1) Sunset PTA and GlamourGals Foundation.
The basic reasons I do [...]]]></description>
			<content:encoded><![CDATA[<p>Volunteering to non-profit organizations or to open source software projects is my second deed (<a href="http://blog.7deeds.com/category/2-deed/">2-deed</a>).</p>
<p><a href="http://builders.railsbridge.org/volunteers/28">I started</a> this activity in June 2009 by becoming a member of <a href="http://builders.railsbridge.org/">Builders</a>, a <a href="http://railsbridge.org/">RailsBridge</a> project, that connects volunteers with projects for <a href="http://en.wikipedia.org/wiki/501(c)#501.28c.29.283.29">501c3 non-profits</a>.</p>
<p>So far, I am volunteering in two projects: 1) <a href="http://builders.railsbridge.org/projects/6">Sunset PTA</a> and <a href="http://builders.railsbridge.org/projects/5">GlamourGals Foundation</a>.</p>
<p>The basic reasons I do this are:</p>
<ul>
<li>Learn</li>
<li>Network</li>
<li>Give back</li>
</ul>
<p>I <strong>learn</strong> asking questions or watching other team members doing stuff I don&#8217;t know. I discovered this way of learning is much faster than just reading and online searching. It cannot replace these of course, but it can help in addition to these methods of learning. Sometimes, when I learn something new from a fellow team member, I feel that it would be very difficult to discover it by myself.</p>
<p>When you volunteer to various projects, it is very easy to meet people with more or less the same mentality as yours. You get the opportunity to know them, open up your mind to new ways of thinking, choose who you like better and maybe create stronger relationships that may lead to other forms of cooperation in the future. This is extremely difficult to accomplish if one is only dedicated to their daily business because they don&#8217;t have many opportunities to <strong>network</strong> with new people.</p>
<p>Years and years, I have been receiving a lot of help from the Internet community in various forms: Forums, using free open source projects, becoming better by participating to various communities, educating myself, watching the improvement of commercial products because of the pressure of open source equivalent products, and more. I <strong>give back</strong> to the community by actively contributing and this makes me feel good. It also helps sustain the community and continue growing it.</p>
<p>This is going to be my second deed and I&#8217;ll keep posting any news that fall under this category.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.7deeds.com/2009/09/01/volunteering/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A typical workflow for a team using Git</title>
		<link>http://blog.7deeds.com/2009/08/27/typical-workflow-team-using-git/</link>
		<comments>http://blog.7deeds.com/2009/08/27/typical-workflow-team-using-git/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 13:28:43 +0000</pubDate>
		<dc:creator>Petros</dc:creator>
				<category><![CDATA[tips]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[ruby-on-rails]]></category>
		<category><![CDATA[self-note]]></category>

		<guid isPermaLink="false">http://blog.7deeds.com/?p=335</guid>
		<description><![CDATA[Lets assume you are in a team, working on a Rails project and you have chosen Git as your version control system. One way to complete a working cycle from pull to push is:
DISCLAIMER: There are more ways and many situations that are not described here. This is only a note to self that may [...]]]></description>
			<content:encoded><![CDATA[<p>Lets assume you are in a team, working on a Rails project and you have chosen Git as your version control system. One way to complete a working cycle from pull to push is:</p>
<p><em>DISCLAIMER: There are more ways and many situations that are not described here. This is only a note to self that may also be useful to you.</em></p>
<p><span id="more-335"></span></p>
<p><strong>Pull from your remote repository to make sure everything is up to date</strong></p>
<pre class="brush: bash; light: true;">git pull origin master</pre>
<p><strong>Create a new local branch for keeping your changes way from your local master branch</strong></p>
<pre class="brush: bash; light: true;">git branch my_new_feature</pre>
<p><strong>Switch to that branch and start working</strong></p>
<pre class="brush: bash; light: true;">git checkout my_new_feature</pre>
<p><strong>After finishing work and running successfully any cukes/specs/tests, commit</strong></p>
<pre class="brush: bash; light: true;">git commit -am &quot;Implemented my new super duper feature&quot;</pre>
<p><strong>Then, switch back to local master and pull if you need to also merge any changes since you first pulled</strong></p>
<pre class="brush: bash; light: true;">
git checkout master
git pull origin master
</pre>
<p><strong>Merge the local feature branch to master and run any cukes/specs/tests and if everything passes push changes</strong></p>
<pre class="brush: bash; light: true;">
git merge my_new_feature
git push origin master
</pre>
<p><strong>This is my preference: I delete the temporary local branch when everything is merged and pushed</strong></p>
<pre class="brush: bash; light: true;">git branch -d my_new_feature</pre>
<p>Update &#8211; Here is a more sophisticated approach: <a href="http://blog.hasmanythrough.com/2008/12/18/agile-git-and-the-story-branch-pattern">Agile git and the story branch pattern</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.7deeds.com/2009/08/27/typical-workflow-team-using-git/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing RSpec and Cucumber</title>
		<link>http://blog.7deeds.com/2009/07/11/installing-rspec-and-cucumber/</link>
		<comments>http://blog.7deeds.com/2009/07/11/installing-rspec-and-cucumber/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 08:29:15 +0000</pubDate>
		<dc:creator>Petros</dc:creator>
				<category><![CDATA[tips]]></category>
		<category><![CDATA[cucumber]]></category>
		<category><![CDATA[rspec]]></category>
		<category><![CDATA[ruby-on-rails]]></category>
		<category><![CDATA[self-note]]></category>

		<guid isPermaLink="false">http://blog.7deeds.com/?p=319</guid>
		<description><![CDATA[Open your shell and,
For RSpec:
$ gem install rspec
For Cucumber:
$ gem install cucumber
Optionally, if you are on Windows, for color output you can also install Win32Console:
$ gem install win32console
]]></description>
			<content:encoded><![CDATA[<p>Open your shell and,</p>
<p>For RSpec:</p>
<pre class="brush: bash; light: true;">$ gem install rspec</pre>
<p>For Cucumber:</p>
<pre class="brush: bash; light: true;">$ gem install cucumber</pre>
<p>Optionally, if you are on Windows, for color output you can also install Win32Console:</p>
<pre class="brush: bash; light: true;">$ gem install win32console</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.7deeds.com/2009/07/11/installing-rspec-and-cucumber/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails drop down lists</title>
		<link>http://blog.7deeds.com/2008/11/17/rails-drop-down-lists/</link>
		<comments>http://blog.7deeds.com/2008/11/17/rails-drop-down-lists/#comments</comments>
		<pubDate>Sun, 16 Nov 2008 22:17:51 +0000</pubDate>
		<dc:creator>Petros</dc:creator>
				<category><![CDATA[tips]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby-on-rails]]></category>

		<guid isPermaLink="false">http://blog.7deeds.com/?p=64</guid>
		<description><![CDATA[Sometimes you want to have a drop down list in your Rails application that contains both the items from a collection of model instances and some other items that are not coming from the collection.

One can combine the results of options_from_collection_for_select and options_for_select to create this. Let&#8217;s say we want to have a form with [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you want to have a drop down list in your Rails application that contains both the items from a collection of model instances and some other items that are not coming from the collection.</p>
<p><span id="more-64"></span></p>
<p>One can combine the results of options_from_collection_for_select and options_for_select to create this. Let&#8217;s say we want to have a form with a drop down list box where we can select a category of products to display. We also want this drop down list to include an option for uncategorized products. The problem is that this option is not a real category.</p>
<p>We can do the following to provide that functionality. First look at the second gist which is the code for the View:</p>
<p><script src="http://gist.github.com/131167.js"></script></p>
<p>If we had three categories, for example Salads, Pizzas, and Drinks, we would get the following list:</p>
<ul>
<li>[Uncategorized]</li>
<li>Salads</li>
<li>Pizzas</li>
<li>Drinks</li>
</ul>
<p>The first option is [Uncategorized] and this comes from calling <em>options_for_select</em>. The rest of the options come from calling <em>options_from_collection_for_select</em>.</p>
<p>Now when that form is submitted, we can examine (see the first gist) what was selected by the user and act accordingly.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.7deeds.com/2008/11/17/rails-drop-down-lists/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use Ruby on Rails in your day job</title>
		<link>http://blog.7deeds.com/2008/03/24/how-to-use-ruby-on-rails-in-your-day-job/</link>
		<comments>http://blog.7deeds.com/2008/03/24/how-to-use-ruby-on-rails-in-your-day-job/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 01:04:43 +0000</pubDate>
		<dc:creator>Petros</dc:creator>
				<category><![CDATA[frameworks]]></category>
		<category><![CDATA[ruby-on-rails]]></category>

		<guid isPermaLink="false">http://blog.7deeds.com/?p=31</guid>
		<description><![CDATA[Disclaimer: I am biased.
A lot of noise started about the use of RoR in the enterprise. Can this be done? Technically, I don&#8217;t see a reason against it.
Programmers low in a company&#8217;s food chain would have to overcome some obstacles in order to push their favorite framework into everyday use.

I tried to identify some of [...]]]></description>
			<content:encoded><![CDATA[<p>Disclaimer: I am biased.</p>
<p>A lot of noise started about the use of RoR in the enterprise. Can this be done? Technically, I don&#8217;t see a reason against it.</p>
<p>Programmers low in a company&#8217;s food chain would have to overcome some obstacles in order to push their favorite framework into everyday use.</p>
<p><span id="more-31"></span></p>
<p>I tried to identify some of your manager&#8217;s concerns:</p>
<h4>What?! You develop using a text editor?</h4>
<p>Managers realize they don&#8217;t have to shell out more than $0 &#8211; $300 for tools/IDE, and they think something is wrong with your favorite framework.</p>
<p>Welcome to open source software. I know there is good and bad open source software out there. Ruby on Rails is good.</p>
<h4>Haven&#8217;t you read all the articles about performance issues?</h4>
<p>If you <a href="http://www.infoq.com/articles/Rails-Performance" target="_blank">know what you are doing</a>, there shouldn&#8217;t be any significant performance issues. Rails does many things for you so you can concentrate on developing your application. Frameworks that automate the plumbing for you usually have performance problems, but this is almost always true because programmers don&#8217;t know how things work behind the scenes. As a result they don&#8217;t know what to avoid or how to write optimized and efficient code.</p>
<p>Fortunately, the longer you use a framework the closer you will be knowing all the tips you need to know in order to avoid any performance issues.</p>
<h4>I have heard you can&#8217;t easily scale if usage explodes.</h4>
<p>Well, look at <a href="http://www.37signals.com/" target="_blank">37signals products</a>. They have more than 1.000.000 users. There must be a way to scale, and maybe it is a matter of learning how. <a href="http://www.radicalbehavior.com/5-question-interview-with-twitter-developer-alex-payne/" target="_blank">According to one of Twitter&#8217;s developers</a>, Ruby is a slower language than Python for example. Some say it doesn&#8217;t matter for web applications since you don&#8217;t need that much speed. What you need is fast database access and a way to scale on the database end.</p>
<p>Rails suffers there as there isn&#8217;t a transparent way to create a pool of databases to choose the one with less load. There are techniques to compensate, but there are voices saying this is not enough.</p>
<p>I think that for applications developed for a small audience, you will have not problems with RoR. Usually, the applications for a company&#8217;s intranet fall to that category.</p>
<p>I any case, <a href="http://trak3r.blogspot.com/2008/03/rails-doesnt-scale.html" target="_blank">you can read several articles about the matter</a> and then confront your boss.</p>
<h4>It&#8217;s free for God&#8217;s sake</h4>
<p>Ok, you lost me there. This is an advantage not a disadvantage.</p>
<h4>Tips</h4>
<p>Some tips for pushing the boss to your direction:</p>
<ol>
<li>Do it first, then present the results.</li>
<li>Do it by solving a company&#8217;s problem. For example, develop a prototype for that helpdesk software they always talk about but never implement.</li>
<li>Find another coworker that can develop the same passion as you.</li>
<li>Just do it, don&#8217;t talk theoretically about it.</li>
<li>Show them a <a href="http://blog.obiefernandez.com/content/2008/03/big-name-compan.html" target="_blank">list</a> of big name companies using Ruby on Rails.</li>
</ol>
<p class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:6e6e6ec1-f8de-475a-81f5-420facd5a491" style="margin: 0px; padding: 0px; display: inline">Technorati Tags: <a href="http://technorati.com/tags/ruby%20on%20rails" rel="tag">ruby on rails</a>,<a href="http://technorati.com/tags/enterprise" rel="tag">enterprise</a>,<a href="http://technorati.com/tags/scalabilty" rel="tag">scalabilty</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.7deeds.com/2008/03/24/how-to-use-ruby-on-rails-in-your-day-job/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
