<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Kev's Big Log - Ruby</title>
    <link>http://blog.zygonia.net/</link>
    <description>Plugging holes in the universe, what are you doing today?</description>
    <image>
      <url>http://blog.zygonia.net/images/tism.jpg</url>
      <title>Kev's Big Log - Ruby</title>
      <link>http://blog.zygonia.net/</link>
    </image>
    <language>en-us</language>
    <copyright>Kevin Kenny</copyright>
    <lastBuildDate>Fri, 20 Oct 2006 02:10:57 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.0.7226.0</generator>
    <managingEditor>kevin.kenny@zygonia.net</managingEditor>
    <webMaster>kevin.kenny@zygonia.net</webMaster>
    <item>
      <trackback:ping>http://blog.zygonia.net/Trackback.aspx?guid=0b98f67a-48ac-49a1-8dc6-870216835bad</trackback:ping>
      <pingback:server>http://blog.zygonia.net/pingback.aspx</pingback:server>
      <pingback:target>http://blog.zygonia.net/PermaLink,guid,0b98f67a-48ac-49a1-8dc6-870216835bad.aspx</pingback:target>
      <dc:creator>Kev</dc:creator>
      <title>Installing Ruby On Rails on Windows From Scratch - Part 1</title>
      <guid isPermaLink="false">http://blog.zygonia.net/PermaLink,guid,0b98f67a-48ac-49a1-8dc6-870216835bad.aspx</guid>
      <link>http://blog.zygonia.net/2006/10/20/InstallingRubyOnRailsOnWindowsFromScratchPart1.aspx</link>
      <pubDate>Fri, 20 Oct 2006 02:10:57 GMT</pubDate>
      <description>&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Having played around with &lt;a href="http://instantrails.rubyforge.org/wiki/wiki.pl?Instant_Rails"&gt;InstantRails&lt;/a&gt; for
a bit I decided I needed to know how to install Ruby on Rails manually. Now I know
there are Ruby MSI installers for windows but there's nothing like doing it the&amp;nbsp;long
way to get to know and understand what gets installed, where it belongs&amp;nbsp;and if
it breaks then you're familiar with the installation. 
&lt;/p&gt;
&lt;p&gt;
So here goes...
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;1. What Do I Download and Where From?&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
First off go grab these files -
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://rubyforge.org/frs/?group_id=426&amp;amp;release_id=5757"&gt;http://rubyforge.org/frs/?group_id=426&amp;amp;release_id=5757&lt;/a&gt;&amp;nbsp;-
Ruby 1.8.5&lt;br&gt;
&lt;a href="http://rubyforge.org/frs/download.php/11290/rubygems-0.9.0.zip"&gt;http://rubyforge.org/frs/download.php/11290/rubygems-0.9.0.zip&lt;/a&gt;&amp;nbsp;-
RubyGems 0.9.0&lt;br&gt;
&lt;a href="http://www.zlib.net/zlib123-dll.zip"&gt;http://www.zlib.net/zlib123-dll.zip&lt;/a&gt;&amp;nbsp;-
zlib 1.2.3&lt;br&gt;
&lt;a href="http://prdownloads.sourceforge.net/gettext/libiconv-1.9.1.bin.woe32.zip?download"&gt;http://prdownloads.sourceforge.net/gettext/libiconv-1.9.1.bin.woe32.zip?download&lt;/a&gt;&amp;nbsp;-
iconv 1.9.1
&lt;/p&gt;
&lt;p&gt;
It's best to create a&amp;nbsp;subfolder in your favourite downloads directory and download
these four files to there and then unzip each one individually to it's own folder.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;2. Where Do I Put It All?&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Rather than deploy into the Program Files folder (spaces in folder names still seems
to send the willies up some of these OS projects occasionally) I created a folder
in the root of my c: drive called RubyTools.&amp;nbsp;I then copied the unzipped ruby-1.8.5
folder&amp;nbsp;and rubygems-0.9.0 folders to &amp;nbsp;c:\RubyTools.
&lt;/p&gt;
&lt;p&gt;
Just a couple of points here - the Ruby interpreter&amp;nbsp;zip file and uncompressed
folder is called ruby-1.8.5-i386-mswin32, I shortened it to ruby-1.8.5 after copying
to make typing easier. In Winzip or WinRAR if you &lt;em&gt;'Extract to&amp;nbsp;\rubygems-0.9.0'&lt;/em&gt; rather
than &lt;em&gt;'Extract to here'&lt;/em&gt; you end up with an extra subfolder called rubygems-0.9.0...just
so you know.
&lt;/p&gt;
&lt;p&gt;
So after copying to my RubyTools folder, this is what my folder structure looks like:
&lt;/p&gt;
&amp;gt;&lt;img src="http://blog.zygonia.net/content/binary/ruby-folders.jpg" border=0&gt; 
&lt;p&gt;
&lt;a href="file:///C:/Documents%20and%20Settings/Kevin/Application%20Data/Windows%20Live%20Writer/PostSupportingFiles/7c7dd189-4efc-41f6-9fd4-3689b751c2f3/rubyfolders2.jpg" atomicselection="true"&gt;&lt;/a&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
Next copy the zlib1.dll file to your Windows system32 folder and rename it zlib.dll.
On my first attempt to install RubyGems (see further on) it crapped out with an error
saying it couldn't locate zlib.dll. You may already have zlib installed so try that
version first.
&lt;/p&gt;
&lt;p&gt;
Finally copy iconv.dll from the extracted iconv bin folder (.\libiconv-1.9.1.bin.woe32\bin)
&amp;nbsp;to your Windows system32 folder. This is a character set conversion library
and the Rails project installer will complain if it's not there. Read more about it
here &lt;a href="http://wiki.rubyonrails.com/rails/pages/iconv"&gt;http://wiki.rubyonrails.com/rails/pages/iconv&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;3. Set Your PATH&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Add the path to the ruby.exe executable to your environment PATH variable. If your
forgot or don't know how to do this: 
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
Right Click + My Computer&lt;br&gt;
click on the Advanced Tab&lt;br&gt;
click on the Environment Variables button&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;em&gt;then either -&lt;br&gt;
&lt;/em&gt;select&amp;nbsp;the PATH variable in the 'System variables' list&lt;br&gt;
click the Edit button&lt;br&gt;
append the path to the ruby executable&lt;br&gt;
&amp;nbsp;&amp;nbsp; &lt;em&gt;...or...&lt;br&gt;
&lt;/em&gt;create a new Environment variable called RUBY and set the path here&lt;br&gt;
append ;%RUBY% to PATH (you need to include the semi-colon if it's not there already)
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;strong&gt;4. Install RubyGem Package Manager&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Open a command prompt window and change directory&amp;nbsp;the rubygems-0.9.0 e.g. cd
\rubytools\rubygems-0.9.0
&lt;/p&gt;
&lt;p&gt;
Type: &lt;strong&gt;ruby setup.rb&lt;/strong&gt; and hit return. You should see something like
this from the installer -
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Lucida Console" size=1&gt;C:\RubyTools\rubygems-0.9.0&amp;gt;ruby setup.rb&lt;br&gt;
---&amp;gt; bin&lt;br&gt;
&amp;lt;--- bin&lt;br&gt;
---&amp;gt; lib&lt;br&gt;
&lt;/font&gt;&lt;font size=1&gt;&lt;font face="Lucida Console"&gt;&lt;em&gt;[snipped for brevity]&lt;br&gt;
&lt;/em&gt;---&amp;gt; lib/rbconfig&lt;br&gt;
&amp;lt;--- lib/rbconfig&lt;br&gt;
---&amp;gt; lib/rubygems&lt;br&gt;
&amp;lt;--- lib/rubygems&lt;br&gt;
&amp;lt;--- lib&lt;br&gt;
rm -f InstalledFiles&lt;br&gt;
---&amp;gt; bin&lt;br&gt;
mkdir -p C:/RubyTools/ruby-1.8.5/bin/&lt;br&gt;
install gem C:/RubyTools/ruby-1.8.5/bin/&lt;br&gt;
install gemlock C:/RubyTools/ruby-1.8.5/bin/&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size=1&gt;&lt;font face="Lucida Console"&gt;&lt;em&gt;[snipped for brevity]&lt;br&gt;
&lt;/em&gt;As of RubyGems 0.8.0, library stubs are no longer needed.&lt;br&gt;
Searching $LOAD_PATH for stubs to optionally delete (may take a while)...&lt;br&gt;
...done.&lt;br&gt;
No library stubs found. &lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Lucida Console" size=1&gt;Successfully built RubyGem&lt;br&gt;
Name: sources&lt;br&gt;
Version: 0.0.1&lt;br&gt;
File: sources-0.0.1.gem &lt;/font&gt; 
&lt;p&gt;
&lt;font face="Lucida Console" size=1&gt;C:\RubyTools\rubygems-0.9.0&amp;gt;&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
And that's the RubyGems package manager installed. 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;5. Install Rails&lt;/strong&gt; 
&lt;p&gt;
&lt;p&gt;
Keep the command prompt window open and type: &lt;strong&gt;gem install rails --include-dependencies&lt;/strong&gt; then
hit return. You'll then see Gem work it's magic and grab the latest version of Rails
(1.1.6 at the time of writing):&amp;nbsp; 
&lt;p&gt;
&lt;p&gt;
&lt;font face="Lucida Console" size=1&gt;C:\RubyTools\rubygems-0.9.0&amp;gt;gem install rails
--include-dependencies 
&lt;br&gt;
Bulk updating Gem source index for: http://gems.rubyforge.org 
&lt;br&gt;
Successfully installed rails-1.1.6 
&lt;br&gt;
Successfully installed rake-0.7.1 
&lt;br&gt;
Successfully installed activesupport-1.3.1 
&lt;br&gt;
Successfully installed activerecord-1.14.4 
&lt;br&gt;
Successfully installed actionpack-1.12.5 
&lt;br&gt;
Successfully installed actionmailer-1.2.5 
&lt;br&gt;
Successfully installed actionwebservice-1.1.6 
&lt;br&gt;
Installing ri documentation for rake-0.7.1... 
&lt;br&gt;
Installing ri documentation for activesupport-1.3.1... 
&lt;br&gt;
&lt;em&gt;[snipped for brevity]&lt;/em&gt;
&lt;br&gt;
Installing RDoc documentation for rake-0.7.1... 
&lt;br&gt;
Installing RDoc documentation for activesupport-1.3.1... 
&lt;br&gt;
Installing RDoc documentation for activerecord-1.14.4... 
&lt;br&gt;
Installing RDoc documentation for actionpack-1.12.5... 
&lt;br&gt;
Installing RDoc documentation for actionmailer-1.2.5... 
&lt;br&gt;
Installing RDoc documentation for actionwebservice-1.1.6... 
&lt;br&gt;
C:\RubyTools\rubygems-0.9.0&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
You might get a couple of messages along the lines of -
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Lucida Console" size=1&gt;While generating documentation for activesupport-1.3.1&lt;br&gt;
... MESSAGE: Unhandled special: Special: type=17, text="&amp;lt;!-- HI --&amp;gt;"&lt;br&gt;
... RDOC args: --ri --op C:/RubyTools/ruby-1.8.5/lib/ruby/gems/1.8/doc/activesu&lt;br&gt;
port-1.3.1/ri --quiet lib&lt;br&gt;
(continuing with the rest of the installation)&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
...and...
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Lucida Console" size=1&gt;While generating documentation for actionpack-1.12.5&lt;br&gt;
... MESSAGE: Unhandled special: Special: type=17, text="&amp;lt;!-- The header part&lt;br&gt;
f this layout --&amp;gt;"&lt;br&gt;
... RDOC args: --ri --op C:/RubyTools/ruby-1.8.5/lib/ruby/gems/1.8/doc/actionpa&lt;br&gt;
k-1.12.5/ri --quiet lib&lt;br&gt;
(continuing with the rest of the installation)&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
This is apparently quite common on Windows platforms and it doesn't seem to affect
anything from what I could google.
&lt;/p&gt;
&lt;p&gt;P&lt; body&gt;
So we're done with the install bit, next time we test our Rails installation to see
if it hangs together.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.zygonia.net/aggbug.ashx?id=0b98f67a-48ac-49a1-8dc6-870216835bad" /&gt;</description>
      <category>Techy</category>
      <category>Ruby</category>
      <category>Rails</category>
    </item>
  </channel>
</rss>