﻿<?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>Ladysign Dev Blog &#187; learn ruby</title>
	<atom:link href="http://www.ladysign-apps.com/blog/tag/learn-ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ladysign-apps.com/blog</link>
	<description>Girls can code.</description>
	<lastBuildDate>Mon, 01 Feb 2010 09:44:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Working with Rails</title>
		<link>http://www.ladysign-apps.com/blog/code/ruby-on-rails/working-with-rails/</link>
		<comments>http://www.ladysign-apps.com/blog/code/ruby-on-rails/working-with-rails/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 18:47:39 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[install rails]]></category>
		<category><![CDATA[install sqlite3]]></category>
		<category><![CDATA[learn ruby]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby database]]></category>
		<category><![CDATA[teach ruby on rails]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=433</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars<br />
In my previous post, I blogged about installing Ruby.<br />
Ruby is the programming language. Rails is a collection of Ruby scr[......]</p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars<br />
In my previous post, I blogged about installing Ruby.<br />
Ruby is the programming language. Rails is a collection of Ruby scripts.<br />
Now let&#8217;s install Rails. &#8211; (Damn this is so easy!)</p>
<p>Just type in the command line (don&#8217;t worry it can take a while):</p>
<pre class="brush: jscript;">
 gem install rails --include-dependencies
</pre>
<p>This will auto install Rails with some documentation.<br />
Now let&#8217;s start to create a Rails workfolder.</p>
<p>I want it something like this:<br />
testProject<br />
-app<br />
-config<br />
-db<br />
-doc<br />
-lib<br />
-log<br />
-public<br />
-script<br />
-test<br />
-temp<br />
-vendor<br />
..README<br />
..RakeFile</p>
<pre class="brush: jscript;">
 rails testProject
</pre>
<p>Done!</p>
<p>To install sqlite3 (database) for Ruby, just type:</p>
<pre class="brush: jscript;">
 gem install sqlite3-ruby --version 1.2.3
</pre>
<p>Creating a sqlite database is easy as well:</p>
<pre class="brush: jscript;">
 rake db:create:all
 ruby script\generate scaffold user first_name:string last_name:string address:text
 rake db:migrate
</pre>
<p>Now prefill this database with values:</p>
<pre class="brush: jscript;">
ruby script\console
lee = User.create(:first_name =&gt; 'lee', :last_name =&gt; 'boonstra', :address =&gt; 'Holland')
</pre>
<p>Do you want a more graphical tool, to view your database or run your queries? Use <a href="http://www.tucows.com/preview/411889">SQLiteManager</a>.</p>
<p>To install gems for debugging ruby code (in for example Aptana):</p>
<pre class="brush: jscript;">
 gem install ruby-debug-ide
</pre>
<p>To install gems for Mongrel HTTP server:</p>
<pre class="brush: jscript;">
 gem install mongrel
</pre>
<p>Do you understand now, why developers love Ruby? It&#8217;s so handy and easy.<br />
And I know more fun! Let&#8217;s create a Ruby webserver! (Again via the command line).</p>
<pre class="brush: jscript;">
ruby script/server
</pre>
<p>Your webserver will be start, by default on port 3000.<br />
Do you want a default port? Let&#8217;s say 8000?</p>
<pre class="brush: jscript;">
ruby script/server -p 8000
</pre>
<p>Now go head! Let&#8217;s run your server: http://localhost:3000</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/ruby-on-rails/working-with-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Start with Ruby on Rails</title>
		<link>http://www.ladysign-apps.com/blog/code/ruby-on-rails/start-with-ruby-on-rails/</link>
		<comments>http://www.ladysign-apps.com/blog/code/ruby-on-rails/start-with-ruby-on-rails/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 12:55:46 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[learn ruby]]></category>
		<category><![CDATA[learn ruby on rails]]></category>
		<category><![CDATA[quickstart]]></category>
		<category><![CDATA[rb]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[start]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=384</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>Let&#8217;s start programming with Ruby. Cause what I&#8217;ve read about it, it should be fast, easy and fun.<br />
You can do[......]</p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>Let&#8217;s start programming with Ruby. Cause what I&#8217;ve read about it, it should be fast, easy and fun.<br />
You can download ruby from: <a href="http://rubyforge.org/frs/?group_id=167&#038;release_id=28426" target="_blank">rubyforge.org</a>.<br />
I installed the windows version. To see if it&#8217;s correctly installed go to your command line:</p>
<pre class="brush: jscript;">
  ruby -v
</pre>
<p>This is what the command line tells me, what is installed:</p>
<pre class="brush: jscript;">
ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]
</pre>
<p>Now create a new folder (structure) for your ruby (.rb) files.<br />
Let&#8217;s start with the famous Hello World example, to print a string:</p>
<p>hello_world.rb:</p>
<pre class="brush: ruby;">
puts &quot;Hello World!&quot;
</pre>
<p>Run this example in the commandline:</p>
<pre class="brush: jscript;">
 ruby hello_world.rb
</pre>
<p>And your done!</p>
<pre class="brush: jscript;">
 Hello World!
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/ruby-on-rails/start-with-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
