<?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>Rails City</title>
	<atom:link href="http://railscity.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://railscity.wordpress.com</link>
	<description>Ruby, Bash, GNU/Linux, Vim,... and Rails</description>
	<lastBuildDate>Sat, 28 Jun 2008 22:30:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='railscity.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Rails City</title>
		<link>http://railscity.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://railscity.wordpress.com/osd.xml" title="Rails City" />
	<atom:link rel='hub' href='http://railscity.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Read a mediawiki list in Ruby</title>
		<link>http://railscity.wordpress.com/2008/06/29/read-a-mediawiki-list-in-ruby/</link>
		<comments>http://railscity.wordpress.com/2008/06/29/read-a-mediawiki-list-in-ruby/#comments</comments>
		<pubDate>Sat, 28 Jun 2008 22:25:43 +0000</pubDate>
		<dc:creator>Héctor</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[mediawiki]]></category>

		<guid isPermaLink="false">http://railscity.wordpress.com/?p=23</guid>
		<description><![CDATA[Read first: - vim and ruby scripts step by step - introduction to regular expressions - wget: download files from the command line vim load_mediawiki_list.rb #Or use your favorite editor and create the file load_mediawiki_list.rb &#60;a&#62; # pulse the &#8220;a&#8221; key (omit if you are using other editor) :wq # save and close in Vim [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railscity.wordpress.com&amp;blog=3973022&amp;post=23&amp;subd=railscity&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Read first:</p>
<p>- <a href="http://railscity.com/2008/06/17/vim-and-ruby-scripts-step-by-step/">vim and ruby scripts step by step</a></p>
<p>- <a href="http://railscity.com/2008/06/22/introduction-to-regular-expressions/">introduction to regular expressions</a></p>
<p>- <a href="http://railscity.com/2008/06/26/wget-download-files-from-the-command-line-in-ubuntu/">wget: download files from the command line</a></p>
<p>vim load_mediawiki_list.rb #Or use your favorite editor and create the file load_mediawiki_list.rb</p>
<p>&lt;a&gt; # pulse the &#8220;a&#8221; key (omit if you are using other editor)</p>
<p><pre class="brush: ruby;">

$stdin.read.each{|line| puts &quot;#{$1} =&gt; #{$2}&quot; if line =~ /&lt;li&gt;([^:]*): (.*)/}

</pre></p>
<p>:wq # save and close in Vim</p>
<p>wget &#8220;<a class="external free" title="http://wiki.favpal.org/Seekr_City/Abbreviations" rel="nofollow" href="http://wiki.favpal.org/Seekr_City/Abbreviations">http://wiki.favpal.org/Seekr_City/Abbreviations</a>&#8221; -O &#8211; | ruby load_mediawiki_list.rb</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/railscity.wordpress.com/23/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/railscity.wordpress.com/23/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/railscity.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/railscity.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/railscity.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/railscity.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/railscity.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/railscity.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/railscity.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/railscity.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/railscity.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/railscity.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/railscity.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/railscity.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/railscity.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/railscity.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railscity.wordpress.com&amp;blog=3973022&amp;post=23&amp;subd=railscity&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://railscity.wordpress.com/2008/06/29/read-a-mediawiki-list-in-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5c9cb51cf281dca2c30707e8680c2f25?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hecpeare</media:title>
		</media:content>
	</item>
		<item>
		<title>Wget: download files from the command line in Ubuntu</title>
		<link>http://railscity.wordpress.com/2008/06/26/wget-download-files-from-the-command-line-in-ubuntu/</link>
		<comments>http://railscity.wordpress.com/2008/06/26/wget-download-files-from-the-command-line-in-ubuntu/#comments</comments>
		<pubDate>Thu, 26 Jun 2008 21:09:37 +0000</pubDate>
		<dc:creator>Héctor</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[GNU]]></category>
		<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[wget]]></category>

		<guid isPermaLink="false">http://railscity.wordpress.com/?p=24</guid>
		<description><![CDATA[Wget is a program for downloading files or webpages from the command line. Of course, it is available in many GNU/Linux distributions and operating systems. We are going to use it a lot and three of the most common uses are the next ones: wget http://www.gutenberg.org/dirs/etext95/study10.txt The file is downloaded as saved as study10.txt We could [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railscity.wordpress.com&amp;blog=3973022&amp;post=24&amp;subd=railscity&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Wget">Wget</a> is a program for downloading files or webpages from the command line. Of course, it is available in many <a href="http://en.wikipedia.org/wiki/Linux_distribution">GNU/Linux distributions</a> and operating systems.</p>
<p>We are going to use it a lot and three of the most common uses are the next ones:</p>
<p>wget http://www.gutenberg.org/dirs/etext95/study10.txt</p>
<p>The file is downloaded as saved as study10.txt We could define the file name with the option &#8220;-O&#8221;:</p>
<p>wget http://www.gutenberg.org/dirs/etext95/study10.txt -O book.txt</p>
<p>Or you also could send it to the standard output with &#8220;-O -&#8221; and use a <a href="http://en.wikipedia.org/wiki/Pipe_(Unix)">pipe</a> (|):</p>
<p>wget http://www.gutenberg.org/dirs/etext95/study10.txt -O &#8211; | <a href="http://en.wikipedia.org/wiki/Grep">grep</a> Holmes</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/railscity.wordpress.com/24/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/railscity.wordpress.com/24/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/railscity.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/railscity.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/railscity.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/railscity.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/railscity.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/railscity.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/railscity.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/railscity.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/railscity.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/railscity.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/railscity.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/railscity.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/railscity.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/railscity.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railscity.wordpress.com&amp;blog=3973022&amp;post=24&amp;subd=railscity&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://railscity.wordpress.com/2008/06/26/wget-download-files-from-the-command-line-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5c9cb51cf281dca2c30707e8680c2f25?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hecpeare</media:title>
		</media:content>
	</item>
		<item>
		<title>Playing with regular expressions in Ruby</title>
		<link>http://railscity.wordpress.com/2008/06/24/playing-with-regular-expressions-in-ruby/</link>
		<comments>http://railscity.wordpress.com/2008/06/24/playing-with-regular-expressions-in-ruby/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 19:12:10 +0000</pubDate>
		<dc:creator>Héctor</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Conan Doyle]]></category>
		<category><![CDATA[gutenberg]]></category>
		<category><![CDATA[regular expressions]]></category>
		<category><![CDATA[Sherlock Holmes]]></category>

		<guid isPermaLink="false">http://railscity.wordpress.com/?p=21</guid>
		<description><![CDATA[After the introduction to regular expressions, we are going to play a bit with a Sherlock Holmes book by Conan Doyle (free download on gutenberg.org): Open a terminal and:<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railscity.wordpress.com&amp;blog=3973022&amp;post=21&amp;subd=railscity&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After the <a href="http://railscity.com/2008/06/22/introduction-to-regular-expressions/">introduction to regular expressions</a>, we are going to play a bit with a <a href="http://en.wikipedia.org/wiki/Sherlock_Holmes">Sherlock Holmes</a> book by <a href="http://en.wikipedia.org/wiki/Conan_Doyle">Conan Doyle</a> (free download on <a href="http://www.gutenberg.org">gutenberg.org</a>):</p>
<p><a href="http://railscity.com/2008/06/14/open-a-terminal-in-ubuntu/">Open a terminal</a> and:</p>
<p><pre class="brush: ruby;">
wget http://www.gutenberg.org/dirs/etext95/study10.txt

irb

book=IO.read(&quot;study10.txt&quot;)

i = book=~/Watson/
=&gt; 15078
book[i-50..i+10]
=&gt; &quot;m.\r\n\r\n\&quot;Whatever have you been doing with yourself, Watson?\&quot;\r\n&quot;

i = book=~/\sWatson\s/
=&gt; 15078
book[i-50..i+10]
=&gt; &quot;click\r\nof the latch as she opened it.\r\n\r\n\&quot;Does Dr. Watson liv&quot;

i = book=~/(\w*) Street/
=&gt; Baker
book[i-50..i+10]
=&gt; &quot;his\r\nrooms with me.  \&quot;I have my eye on a suite in Baker Stree&quot;

a=[]
book.each{|line| a&lt;
	&lt;line if line=~/(\w*) Street/}
=&gt; ...

a.size
=&gt; 9

puts a
=&gt; rooms with me.  &quot;I have my eye on a suite in &lt;strong&gt;Baker Street&lt;/strong&gt;,&quot;
at No. 221B, {5} &lt;strong&gt;Baker Street&lt;/strong&gt;, of which he had spoken at our
and we stood together at the corner of &lt;strong&gt;Henrietta Street&lt;/strong&gt; a-talkin'.
...

</pre></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/railscity.wordpress.com/21/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/railscity.wordpress.com/21/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/railscity.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/railscity.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/railscity.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/railscity.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/railscity.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/railscity.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/railscity.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/railscity.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/railscity.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/railscity.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/railscity.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/railscity.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/railscity.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/railscity.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railscity.wordpress.com&amp;blog=3973022&amp;post=21&amp;subd=railscity&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://railscity.wordpress.com/2008/06/24/playing-with-regular-expressions-in-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5c9cb51cf281dca2c30707e8680c2f25?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hecpeare</media:title>
		</media:content>
	</item>
		<item>
		<title>Introduction to regular expressions</title>
		<link>http://railscity.wordpress.com/2008/06/22/introduction-to-regular-expressions/</link>
		<comments>http://railscity.wordpress.com/2008/06/22/introduction-to-regular-expressions/#comments</comments>
		<pubDate>Sun, 22 Jun 2008 11:17:53 +0000</pubDate>
		<dc:creator>Héctor</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[regular expressions]]></category>

		<guid isPermaLink="false">http://railscity.wordpress.com/?p=19</guid>
		<description><![CDATA[&#8220;Regular expressions provide a concise and flexible means for identifying strings of text of interest, such as particular characters, words, or patterns of characters. The following examples illustrate a few specifications that could be expressed in a regular expression: * the sequence of characters &#8220;car&#8221; in any context, such as &#8220;car&#8221;, &#8220;cartoon&#8221;, or &#8220;bicarbonate&#8221; * [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railscity.wordpress.com&amp;blog=3973022&amp;post=19&amp;subd=railscity&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&#8220;Regular expressions provide a concise and flexible means for identifying strings of text of interest, such as particular characters, words, or patterns of characters.</p>
<p>The following examples illustrate a few specifications that could be expressed in a regular expression:</p>
<p>* the sequence of characters &#8220;car&#8221; in any context, such as &#8220;car&#8221;, &#8220;cartoon&#8221;, or &#8220;bicarbonate&#8221;<br />
* the word &#8220;car&#8221; when it appears as an isolated word<br />
* the word &#8220;car&#8221; when preceded by the word &#8220;blue&#8221; or &#8220;red&#8221;<br />
* a dollar sign immediately followed by one or more digits, and then optionally a period and exactly two more digits</p>
<p>Regular expressions can be much more complex than these examples.&#8221; (from <a href="http://en.wikipedia.org/wiki/Regular_expression">Wikipedia</a>)</p>
<p>Now, <a href="http://railscity.com/2008/06/14/open-a-terminal-in-ubuntu/">open a terminal</a>, introduce &#8220;irb&#8221; or go to <a href="http://railscity.com/2008/06/13/go-and-try-ruby/">tryruby</a> and continue playing:</p>
<p><pre class="brush: ruby;">

1. &quot;My child loves cartoons and dogs&quot;=~/car/
=&gt; 14

# \s: whitespace
&quot;My child loves cartoons and dogs&quot;=~/[\s]car[\s]/
=&gt; nil

&quot;My child loves cars and dogs&quot;=~/[\s]cars[\s]/
=&gt; 14

&quot;My child loves cars! and dogs&quot;=~/[\s]cars[\s]/
=&gt; nil

# \w: any word character
# [^\w]: any character except word characters
&quot;My child loves cars!&quot;=~/[^\w]cars[^\w]/
=&gt; 14

&quot;My child loves cars&quot;=~/[^\w]cars[^\w]/
=&gt; nil

#$ end of the string
&quot;My child loves cars&quot;=~/[^\w]cars$/
=&gt; 14

#([^\w]|$) any non word character or end of the string
&quot;My child loves cars&quot;=~/[^\w]cars([^\w]|$)/
=&gt; 14

&quot;My child loves blue cars&quot;=~/blue cars/
=&gt; 15

&quot;My child loves red cars&quot;=~/(blue|red) cars/

=&gt; 15
$1
=&gt; red

&quot;My child loves blue cars&quot;=~/(blue|red) cars/
=&gt; 15
$1
=&gt; blue

</pre></p>
<p>More info <a href="http://www.ilovejackdaniels.com/cheat-sheets/regular-expressions-cheat-sheet/">here</a>:<br />
<img src="http://www.ilovejackdaniels.com/cheat-sheets/regular_expressions_cheat_sheet.png" alt="" width="763" height="1037" /></pre>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/railscity.wordpress.com/19/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/railscity.wordpress.com/19/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/railscity.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/railscity.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/railscity.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/railscity.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/railscity.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/railscity.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/railscity.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/railscity.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/railscity.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/railscity.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/railscity.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/railscity.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/railscity.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/railscity.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railscity.wordpress.com&amp;blog=3973022&amp;post=19&amp;subd=railscity&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://railscity.wordpress.com/2008/06/22/introduction-to-regular-expressions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5c9cb51cf281dca2c30707e8680c2f25?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hecpeare</media:title>
		</media:content>

		<media:content url="http://www.ilovejackdaniels.com/cheat-sheets/regular_expressions_cheat_sheet.png" medium="image" />
	</item>
		<item>
		<title>YAML</title>
		<link>http://railscity.wordpress.com/2008/06/20/yaml/</link>
		<comments>http://railscity.wordpress.com/2008/06/20/yaml/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 17:01:31 +0000</pubDate>
		<dc:creator>Héctor</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[YAML]]></category>

		<guid isPermaLink="false">http://railscity.wordpress.com/?p=18</guid>
		<description><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railscity.wordpress.com&amp;blog=3973022&amp;post=18&amp;subd=railscity&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><pre class="brush: ruby;">
require 'yaml'
=&gt; true

any_object=[2,3,&quot;hi&quot;]
=&gt; [2, 3, &quot;hi&quot;]

dumped=YAML.dump(any_object) # You could store it in a file
=&gt; &quot;--- \n- 2\n- 3\n- hi\n&quot;

YAML.load(dumped)
=&gt; [2, 3, &quot;hi&quot;]
</pre></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/railscity.wordpress.com/18/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/railscity.wordpress.com/18/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/railscity.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/railscity.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/railscity.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/railscity.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/railscity.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/railscity.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/railscity.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/railscity.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/railscity.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/railscity.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/railscity.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/railscity.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/railscity.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/railscity.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railscity.wordpress.com&amp;blog=3973022&amp;post=18&amp;subd=railscity&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://railscity.wordpress.com/2008/06/20/yaml/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5c9cb51cf281dca2c30707e8680c2f25?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hecpeare</media:title>
		</media:content>
	</item>
		<item>
		<title>Read and write files in Ruby</title>
		<link>http://railscity.wordpress.com/2008/06/19/read-and-write-files-in-ruby/</link>
		<comments>http://railscity.wordpress.com/2008/06/19/read-and-write-files-in-ruby/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 15:04:10 +0000</pubDate>
		<dc:creator>Héctor</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[read]]></category>
		<category><![CDATA[write]]></category>

		<guid isPermaLink="false">http://railscity.wordpress.com/?p=17</guid>
		<description><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railscity.wordpress.com&amp;blog=3973022&amp;post=17&amp;subd=railscity&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><pre class="brush: ruby;">
irb

File.open(&quot;file.txt&quot;,&quot;w&quot;){|f| f.puts &quot;override with this&quot;}
=&gt; nil
IO.read(&quot;file.txt&quot;)
=&gt; &quot;override with this\n&quot;

File.open(&quot;file.txt&quot;,&quot;w&quot;){|f| f.puts &quot;override with this 2&quot;}
=&gt; nil
IO.read(&quot;file.txt&quot;)
=&gt; &quot;override with this 2\n&quot;

File.open(&quot;file.txt&quot;,&quot;a&quot;){|f| f.puts &quot;add this&quot;}
=&gt; nil
text=IO.read(&quot;file.txt&quot;)
=&gt; &quot;override with this 2\nadd this\n&quot;

puts text
&gt; override with this
&gt; add this
=&gt; nil

</pre></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/railscity.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/railscity.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/railscity.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/railscity.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/railscity.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/railscity.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/railscity.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/railscity.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/railscity.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/railscity.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/railscity.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/railscity.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/railscity.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/railscity.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/railscity.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/railscity.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railscity.wordpress.com&amp;blog=3973022&amp;post=17&amp;subd=railscity&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://railscity.wordpress.com/2008/06/19/read-and-write-files-in-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5c9cb51cf281dca2c30707e8680c2f25?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hecpeare</media:title>
		</media:content>
	</item>
		<item>
		<title>A simple but useful script</title>
		<link>http://railscity.wordpress.com/2008/06/18/reduce-image-a-simple-but-useful-script/</link>
		<comments>http://railscity.wordpress.com/2008/06/18/reduce-image-a-simple-but-useful-script/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 09:29:00 +0000</pubDate>
		<dc:creator>Héctor</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[arguments]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[each]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://railscity.wordpress.com/?p=15</guid>
		<description><![CDATA[irb system(&#8220;ls&#8221;) &#62; &#8230; &#8220;string #{2*5}&#8221; &#62; &#8220;string 10&#8243; exit vim each_args.rb &#60;a&#62; &#60;Esc&#62; :wq ruby each_args.rb argument1 argument2 &#62; argument1 &#62; argument2 In Ubuntu, install the convert package: sudo aptitude install convert vim reduce_image.rb &#60;a&#62; &#60;Esc&#62; :wq ls -l *jpg &#62; -rw-r&#8211;r&#8211; 1 hector hector 6511067 2005-07-31 04:25 Earth.jpg &#62; -rw-r&#8211;r&#8211; 1 hector hector  [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railscity.wordpress.com&amp;blog=3973022&amp;post=15&amp;subd=railscity&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>irb<br />
system(&#8220;ls&#8221;)<br />
&gt; &#8230;</p>
<p>&#8220;string #{2*5}&#8221;<br />
&gt; &#8220;string 10&#8243;</p>
<p>exit</p>
<p><strong>vim each_args.rb</strong><br />
&lt;a&gt;</p>
<p><pre class="brush: ruby;">

$*.each{|n| puts n}

</pre></p>
<p>&lt;Esc&gt;<br />
:wq</p>
<p>ruby each_args.rb argument1 argument2<br />
&gt; argument1<br />
&gt; argument2</p>
<p>In Ubuntu, install the convert package:<br />
sudo aptitude install convert</p>
<p><strong>vim reduce_image.rb</strong><br />
&lt;a&gt;</p>
<p><pre class="brush: ruby;">

$*.each{|file| system(&quot;convert #{file} -resize 50% #{file}&quot;)}

</pre></p>
<p>&lt;Esc&gt;<br />
:wq</p>
<p><pre class="brush: ruby;">
wget http://upload.wikimedia.org/wikipedia/commons/9/97/The_Earth_seen_from_Apollo_17.jpg -O Earth.jpg
wget http://upload.wikimedia.org/wikipedia/commons/d/dd/Full_Moon_Luc_Viatour.jpg -O Moon.jpg
</pre></p>
<p>ls -l *jpg<br />
&gt; -rw-r&#8211;r&#8211; 1 hector hector 6511067 2005-07-31 04:25 Earth.jpg<br />
&gt; -rw-r&#8211;r&#8211; 1 hector hector  924214 2006-10-07 23:59 Moon.jpg</p>
<p>ruby reduce_image.rb *jpg<br />
ls -l *jpg<br />
&gt; -rw-r&#8211;r&#8211; 1 hector hector 2521991 2008-06-14 23:14 Earth.jpg<br />
&gt; -rw-r&#8211;r&#8211; 1 hector hector  246682 2008-06-14 23:14 Moon.jpg</p>
<p>ruby reduce_image.rb *jpg<br />
ls -l *jpg<br />
&gt; -rw-r&#8211;r&#8211; 1 hector hector 689873 2008-06-14 23:15 Earth.jpg<br />
&gt; -rw-r&#8211;r&#8211; 1 hector hector  71721 2008-06-14 23:15 Moon.jpg</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/railscity.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/railscity.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/railscity.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/railscity.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/railscity.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/railscity.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/railscity.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/railscity.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/railscity.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/railscity.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/railscity.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/railscity.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/railscity.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/railscity.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/railscity.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/railscity.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railscity.wordpress.com&amp;blog=3973022&amp;post=15&amp;subd=railscity&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://railscity.wordpress.com/2008/06/18/reduce-image-a-simple-but-useful-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5c9cb51cf281dca2c30707e8680c2f25?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hecpeare</media:title>
		</media:content>
	</item>
		<item>
		<title>Vim and ruby scripts step by step</title>
		<link>http://railscity.wordpress.com/2008/06/17/vim-and-ruby-scripts-step-by-step/</link>
		<comments>http://railscity.wordpress.com/2008/06/17/vim-and-ruby-scripts-step-by-step/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 19:38:43 +0000</pubDate>
		<dc:creator>Héctor</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Vim]]></category>

		<guid isPermaLink="false">http://railscity.wordpress.com/?p=13</guid>
		<description><![CDATA[Vim is a really useful text editor. Its based on commands interface may frighten you but don't worry, it's easy to start playing and you'll start to see its power soon. In Ubuntu, install the vim-full package: sudo aptitude install vim-full Download it here for Windows or see this for other operation systems. You also [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railscity.wordpress.com&amp;blog=3973022&amp;post=13&amp;subd=railscity&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre>Vim is a really useful text editor. Its based on commands interface may frighten you but don't worry, it's easy to start playing and you'll start to see its power soon.

In Ubuntu, install the vim-full package:
sudo aptitude install vim-full

Download it <a href="ftp://ftp.vim.org/pub/vim/pc/gvim71.exe">here</a> for Windows or see <a href="http://www.vim.org/download.php">this</a> for other operation systems.

You also could install gvim which is a graphical interface for vim:
sudo aptitude install gvim

And just start the play:

vim args.rb # (or gvim args.rb if you want the graphical interface)
Pulse the a key (&lt;a&gt; afterwards)
$*.each{|n| puts n}
&lt;Esc&gt;
:wq

ruby args.rb arg1 arg2 arg3
&gt;arg1
&gt;arg2
&gt;arg3

vim upcase.rb
Pulse the a key (&lt;a&gt; afterwards)
puts $*[0].upcase
&lt;Esc&gt;
:wq

ruby upcase.rb "hello"
=&gt;HELLO

echo "hello" | ruby upcase.rb
=&gt;

vim upcase.rb
&lt;a&gt;
&lt;use the arrows for moving the cursor&gt;
arg0_or_stdin = $* == [] ? $stdin.read : $*[0]
puts arg0_or_stdin.upcase
&lt;Esc&gt;
:wq

echo "hello" | ruby upcase.rb
=&gt;HELLO</pre>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/railscity.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/railscity.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/railscity.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/railscity.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/railscity.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/railscity.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/railscity.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/railscity.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/railscity.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/railscity.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/railscity.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/railscity.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/railscity.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/railscity.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/railscity.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/railscity.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railscity.wordpress.com&amp;blog=3973022&amp;post=13&amp;subd=railscity&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://railscity.wordpress.com/2008/06/17/vim-and-ruby-scripts-step-by-step/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5c9cb51cf281dca2c30707e8680c2f25?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hecpeare</media:title>
		</media:content>
	</item>
		<item>
		<title>Conditionals in Ruby</title>
		<link>http://railscity.wordpress.com/2008/06/16/conditionals-in-ruby/</link>
		<comments>http://railscity.wordpress.com/2008/06/16/conditionals-in-ruby/#comments</comments>
		<pubDate>Sun, 15 Jun 2008 22:06:10 +0000</pubDate>
		<dc:creator>Héctor</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[conditionals]]></category>
		<category><![CDATA[if]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://railscity.wordpress.com/?p=8</guid>
		<description><![CDATA[Open a terminal and play with the if and unless clauses:<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railscity.wordpress.com&amp;blog=3973022&amp;post=8&amp;subd=railscity&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre><a href="http://railscity.com/2008/06/14/open-a-terminal-in-ubuntu/">Open a terminal</a> and play with the <em>if</em> and <em>unless</em> clauses:<br />
<pre class="brush: ruby;">
irb

a=Time.now.month
=&gt; 6

&quot;June&quot; if a==6
=&gt; &quot;June&quot;

&quot;not January&quot; unless a==1
=&gt; nil

if Time.now.year==2008
  out=&quot;ok&quot;
else
  out=&quot;really?&quot;
end
=&gt; &quot;ok&quot;

# And other shorter way:
out = Time.now.year==2008 ? &quot;ok&quot; : &quot;really?&quot;
=&gt; &quot;ok&quot;

</pre></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/railscity.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/railscity.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/railscity.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/railscity.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/railscity.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/railscity.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/railscity.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/railscity.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/railscity.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/railscity.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/railscity.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/railscity.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/railscity.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/railscity.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/railscity.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/railscity.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railscity.wordpress.com&amp;blog=3973022&amp;post=8&amp;subd=railscity&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://railscity.wordpress.com/2008/06/16/conditionals-in-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5c9cb51cf281dca2c30707e8680c2f25?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hecpeare</media:title>
		</media:content>
	</item>
		<item>
		<title>How to install Ruby on Rails in Ubuntu Hardy</title>
		<link>http://railscity.wordpress.com/2008/06/15/how-to-install-ruby-on-rails-in-ubuntu-hardy/</link>
		<comments>http://railscity.wordpress.com/2008/06/15/how-to-install-ruby-on-rails-in-ubuntu-hardy/#comments</comments>
		<pubDate>Sat, 14 Jun 2008 22:56:57 +0000</pubDate>
		<dc:creator>Héctor</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://railscity.wordpress.com/?p=7</guid>
		<description><![CDATA[Note: Ruby on Rails is available for other GNU/Linux distributions, Mac OS and Windows so you don&#8217;t have to use Ubuntu, but you could give it a try and download it from here (or even request an Ubuntu CD for free). Open a terminal and follow this great article (but keep in mind that the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railscity.wordpress.com&amp;blog=3973022&amp;post=7&amp;subd=railscity&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Note: Ruby on Rails is available for other <a href="http://www.rubyonrails.org/down">GNU/Linux distributions, Mac OS and Windows</a> so you don&#8217;t have to use Ubuntu, but you could give it a try and <a href="http://www.ubuntu.com/getubuntu/download">download it from here</a> (or even <a href="https://shipit.ubuntu.com/">request an Ubuntu CD for free</a>).</p>
<p><a href="http://railscity.com/2008/06/14/open-a-terminal-in-ubuntu/">Open a terminal</a> and follow <a href="http://articles.slicehost.com/2008/4/30/ubuntu-hardy-ruby-on-rails">this great article</a> (but keep in mind that the <a href="http://slicehost.com">Slicehost</a> articles are for servers):</p>
<pre>sudo aptitude install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8 libreadline-ruby1.8 libruby1.8 libopenssl-ruby sqlite3 libsqlite3-ruby1.8

sudo ln -s /usr/bin/ruby1.8 /usr/bin/ruby

sudo ln -s /usr/bin/ri1.8 /usr/bin/ri

sudo ln -s /usr/bin/rdoc1.8 /usr/bin/rdoc

sudo ln -s /usr/bin/irb1.8 /usr/bin/irb

mkdir ~/sources

cd ~/sources

wget <a class="external free" title="http://rubyforge.org/frs/download.php/34638/rubygems-1.1.0.tgz" rel="nofollow" href="http://rubyforge.org/frs/download.php/34638/rubygems-1.1.0.tgz">http://rubyforge.org/frs/download.php/34638/rubygems-1.1.0.tgz</a>

tar xzvf rubygems-1.1.0.tgz

cd  rubygems-1.1.0

sudo ruby setup.rb

sudo ln -s /usr/bin/gem1.8 /usr/bin/gem

sudo ln -s /usr/bin/gem1.8 /usr/bin/gem

sudo gem update --system

sudo gem install rails

sudo aptitude install postfix subversion</pre>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/railscity.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/railscity.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/railscity.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/railscity.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/railscity.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/railscity.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/railscity.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/railscity.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/railscity.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/railscity.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/railscity.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/railscity.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/railscity.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/railscity.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/railscity.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/railscity.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=railscity.wordpress.com&amp;blog=3973022&amp;post=7&amp;subd=railscity&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://railscity.wordpress.com/2008/06/15/how-to-install-ruby-on-rails-in-ubuntu-hardy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5c9cb51cf281dca2c30707e8680c2f25?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hecpeare</media:title>
		</media:content>
	</item>
	</channel>
</rss>
