<?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:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>Man With Code &#187; projects</title>
	<atom:link href="http://manwithcode.com/tag/projects/feed/" rel="self" type="application/rss+xml" />
	<link>http://manwithcode.com</link>
	<description>Teaching You, One Tutorial at a Time</description>
	<lastBuildDate>Thu, 09 Feb 2012 03:57:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Programming With Ruby Episode 11, Ruby Projects</title>
		<link>http://manwithcode.com/176/programming-with-ruby-episode-11-ruby-projects/</link>
		<comments>http://manwithcode.com/176/programming-with-ruby-episode-11-ruby-projects/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 06:00:31 +0000</pubDate>
		<dc:creator>Tyler</dc:creator>
				<category><![CDATA[Ruby Programming]]></category>
		<category><![CDATA[Videos]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[require]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubyforge]]></category>

		<guid isPermaLink="false">http://manwithcode.com/?p=176</guid>
		<description><![CDATA[Covered In This Episode: Finding projects (GitHub, RubyForge) Using Rubygems Using the code Transcript: Hello Everybody and welcome to Programming With Ruby Episode 11, Ruby Projects. I&#8217;m Tyler, and this video is brought to you by manwithcode.com. Despite what the name may imply, this episode is not about making projects in ruby, but finding and [...]]]></description>
			<content:encoded><![CDATA[<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/_F0UHFpk2R0&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/_F0UHFpk2R0&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p><strong>Covered In This Episode:</strong></p>
<ul>
<li>Finding projects (GitHub, RubyForge)</li>
<li>Using Rubygems</li>
<li>Using the code</li>
</ul>
<p><strong>Transcript:</strong></p>
<p>Hello Everybody and welcome to Programming With Ruby Episode 11, Ruby<br />
Projects. I&#8217;m Tyler, and this video is brought to you by<br />
manwithcode.com.</p>
<p>Despite what the name may imply, this episode is not about making<br />
projects in ruby, but finding and using projects other people have<br />
made. I will be showing you <a href="http://rubyforge.org">rubyforge.org</a> and <a href="http://github.com">github.com</a>, both places<br />
have many different and useful projects hosted.</p>
<p>I will also be showing you how to use rubygems, arguably the easiest<br />
and most popular way of installing, managing, and keeping up to date<br />
various ruby libraries, tools, etc. which rubygems calls gems.</p>
<p>And finally you will learn how to use the code you find!</p>
<p>Lets get started!</p>
<p><strong>Finding Projects &#8211; Rubyforge</strong></p>
<p>Rubyforge is one of the most popular hosting sites for ruby<br />
projects. (It is also where most gems are hosted)</p>
<p>Just navigate over to <a href="http://rubyforge.org">http://rubyforge.org</a> to get started</p>
<p>If you want to find a project, you have a few options. First is the<br />
search box located at the top right of the website.</p>
<p>Second is the project tree where you can find projects by the category<br />
they are in.</p>
<p>Third is the most popular projects on the homepage, which can be<br />
helpful from time to time.</p>
<p>If you find a project that you like, you can download it, or install<br />
it as a gem if it is available. Both of which will be covered a little<br />
later in this tutorial.</p>
<p><strong>Finding Projects &#8211; GitHub</strong></p>
<p>Github is another project hosting site, that easily lets developers<br />
collaborate using the version control system, git. Github has been<br />
gaining a lot of popularity with Ruby programmers lately and you can<br />
find many Ruby projects here.</p>
<p>GitHub is located at <a href="http://github.com">http://github.com</a></p>
<p>GitHub has search functionality, and most popular like Rubyforge, but<br />
it is a little more comprehensive.</p>
<p>GitHub also offers nice graphs and many download options depending on<br />
your needs.</p>
<p><strong>Using Rubygems</strong></p>
<p>To start using rubygems, first you have to install it. If you<br />
installed via a one-click installer you probably already have it. To<br />
check if you have it installed, open your command prompt and enter<br />
&#8220;gem&#8221;. If nothing comes up, it is not installed.</p>
<p>If you are on Debian or a variant of it (such as Ubuntu) this command<br />
will get you rubygems: sudo apt-get install rubygems</p>
<p>Otherwise go to <a href="http://rubygems.org">http://rubygems.org/</a> and download rubygems from there.</p>
<p>After you&#8217;ve installed, run the command:<br />
gem</p>
<p>to make sure the installation succeed. If not you may have to add<br />
rubygems to your PATH, a quick Google search will tell you how.</p>
<p>For this example I you will install the gem hpricot, which parses HTML.<br />
simply use the command:<br />
gem install hpricot<br />
or<br />
sudo gem install hpricot</p>
<p>It should install successfully, and now you can start using it in your code!</p>
<p>But before we do that, I would like to show you a few more features or rubygems.</p>
<p>&#8220;gem list&#8221; lists all the gems you have installed<br />
&#8220;gem uninstall gem&#8221; uninstalls the specified gem<br />
&#8220;gem update&#8221; updates all your gems<br />
&#8220;gem help commands&#8221; shows all commands that rubygems has, so you can<br />
explore on your own!</p>
<p><strong>Using the code</strong></p>
<p>Now that you have installed a gem, or downloaded a projects source<br />
code, you can use it in your own programs.</p>
<p>To obtain access to an installed gem, or the source file add the<br />
following line to the top of your program:</p>
<pre class="brush: ruby; title: ; notranslate">
require 'rubygems'
require 'name' # Name can be a gem or a source file
</pre>
<p>if you are just using a source file, you don&#8217;t need to require rubygems<br />
example:</p>
<pre class="brush: ruby; title: ; notranslate">
require 'rubygems'
require 'hpricot'
</pre>
<p>If you are loading a file that can change, use load:<br />
load &#8216;name&#8217; # Name can be a gem or a source file</p>
<p>Note that I said source file. This means that you can separate your<br />
own code into different files and load them in using the load or<br />
require methods!</p>
<p>Now we have reached that sad sad time, when the episode starts ending.</p>
<p>If you have any question, comments, or suggestions leave a comment on<br />
this page, or send me an email at tyler@manwithcode.com</p>
<p>Please do not forget to donate, a small $5 or $10 donation will help<br />
more than you realize!</p>
<p>Thanks for watching, Goodbye.</p>
]]></content:encoded>
			<wfw:commentRss>http://manwithcode.com/176/programming-with-ruby-episode-11-ruby-projects/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<series:name><![CDATA[Ruby Programming]]></series:name>
	</item>
	</channel>
</rss>

