﻿<?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; ruby on rails</title>
	<atom:link href="http://www.ladysign-apps.com/blog/category/code/ruby-on-rails/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>Installing sqlite3 fails</title>
		<link>http://www.ladysign-apps.com/blog/code/ruby-on-rails/installing-sqlite3-fails/</link>
		<comments>http://www.ladysign-apps.com/blog/code/ruby-on-rails/installing-sqlite3-fails/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 12:10:54 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[fails]]></category>
		<category><![CDATA[installing sqlite]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sqlite3]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=610</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>Ajj. Working with Ruby and the gem for installing sqlite database fails.<br />
I tried to download sqlite3, and run the install[......]</p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>Ajj. Working with Ruby and the gem for installing sqlite database fails.<br />
I tried to download sqlite3, and run the install gem command:</p>
<pre class="brush: jscript;">
D:\&gt;gem install sqlite3-ruby

Building native extensions.  This could take a while...ERROR:  Error installing sqlite3-ruby:        ERROR: Failed to build gem native extension.c:/ruby/bin/ruby.exe extconf.rb install sqlite3-ruby --platform Win32checking for fdatasync() in rt.lib... nochecking for sqlite3.h... nonmake'nmake' is not recognized as an internal or external command,operable program or batch file.Gem files will remain installed in c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4 for inspection.Results logged to c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4/ext/sqlite3_api/gem_make.out
</pre>
<p>This is because not all versions of  sqlite3 are windows versions.<br />
Fine, and now?<br />
You can list all available sqlite gems:</p>
<pre class="brush: jscript;">
D:\&gt;gem list --remote --all sqlite

*** REMOTE GEMS ***

sqlite (2.0.1, 2.0.0, 1.3.1, 1.3.0, 1.2.9.1, 1.2.0, 1.1.3, 1.1.2, 1.1.1, 1.1)
sqlite-ruby (2.2.3, 2.2.2, 2.2.1, 2.2.0, 2.1.0, 2.0.3, 2.0.2)
sqlite3-ruby (1.2.4, 1.2.3, 1.2.2, 1.2.1, 1.2.0, 1.1.0, 1.0.1, 1.0.0, 0.9.0, 0.6
.0, 0.5.0)
sqlitecache (0.0.1)
</pre>
<p>Then, you can easily install the version you need:</p>
<pre class="brush: jscript;">
D:\&gt;gem install sqlite3-ruby -v 1.2.3
Successfully installed sqlite3-ruby-1.2.3-x86-mswin32
1 gem installed
Installing ri documentation for sqlite3-ruby-1.2.3-x86-mswin32...
Installing RDoc documentation for sqlite3-ruby-1.2.3-x86-mswin32...
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/ruby-on-rails/installing-sqlite3-fails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>
