<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Article RSS Feed</title>
    <link>http://matt-hulse.heroku.com/rss/</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>The main blog feed for my Web site.</description>
    
    
        <item>
          <title>Another go with Rails 3 on Windows</title>
          <description>It has been awhile since we last looked at Rails 3 on Windows and a lot has changed.&lt;br /&gt;
&lt;br /&gt;
Start by downloading and installing Ruby 1.9.2p0 from &lt;a href=&quot;http://rubyforge.org/frs/download.php/72170/rubyinstaller-1.9.2-p0.exe&quot; target=&quot;_BLANK&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Once installed, open a command prompt and install rails: 
&lt;div class=&quot;code&quot;&gt;gem install rails --pre --no-ri --no-rdoc&lt;/div&gt;
Create a new rails app:
&lt;div class=&quot;code&quot;&gt;rails new TestRails3&lt;/div&gt;
Now make sure the dependencies are met:
&lt;div class=&quot;code&quot;&gt;cd TestRails3&lt;br /&gt; bundle install&lt;/div&gt;
(at this point, more work may need to be done to get sqlite working.  You can download the dll from &lt;a href=&quot;http://www.sqlite.org/sqlitedll-3_7_2.zip&quot; target=&quot;_BLANK&quot;&gt;here&lt;/a&gt;.  Copy the dll into the System Path.  I use C:\Tools and add that directory to the path.  The Ruby bin directory works too.)&lt;br /&gt;&lt;br /&gt;
Now create some scaffolding:
&lt;div class=&quot;code&quot;&gt;rails g scaffold post title:string body:text&lt;br /&gt;rake db:migrate&lt;/div&gt;&lt;br /&gt;
And start the server:
&lt;div class=&quot;code&quot;&gt;rails server&lt;/div&gt;
Navigate to http://localhost:3000/posts and see that everything is working.&lt;br /&gt;
You are now riding Rails 3 on Windows!&lt;br /&gt;

</description>
          <pubDate>Wed, 25 Aug 2010 23:30:10 GMT</pubDate>
          <guid>http://matt-hulse.heroku.com/articles/2010/08/25/another-go-with-rails-3-on-windows/</guid>
          <link>http://matt-hulse.heroku.com/articles/2010/08/25/another-go-with-rails-3-on-windows/</link>
        </item>
    
        <item>
          <title>Ruby is too tightly coupled</title>
          <description>I Love Ruby.  Unfortunately &quot;require 'ruby'&quot; brings in unrelated cruft that I don't love.  That has led me to the opinion that Ruby is too tightly coupled.  I am not a VM implementor, I haven't even looked at the source code of Ruby itself, so how, you might ask, have I come to this conclusion?
&lt;br /&gt;&lt;br /&gt;
Here are a few modules that are automatically included when I require 'ruby'
&lt;br /&gt;&lt;br /&gt;
&lt;b&gt;module Rockstar&lt;/b&gt;&lt;br /&gt;
Primadonnas had a negative connotation in the coding world but somewhere along the way it became a good thing to be completely self centered, egotistical, crass, and crude, without regard for anyone but numero uno.  These are Rockstars and companies even seek after them now.  Two talks into Mountain West Ruby Conference awhile back, I had heard the F-Bomb more frequently than the word &quot;Ruby&quot; and endured several minutes of crude junior high locker room humor referring to the sexual connotations of Python.  Fortunately most of the speakers were far more respectful to the audience but unfortunately I got sick and ended up leaving the conference after day one (food poisoning I think.)  At home I tried to listen to the justin.tv stream towards the end of the second day.  My 4 year old daughter wanted to sit on my lap and watch with me.  I didn't have it on for more than 15 minutes before another F-Bomb was dropped so I decided I would wait for the videos to be posted later when I could watch without worrying about my little girl's ears.  Don't get me wrong, I don't expect a Ruby Conference to be an appropriate place for a 4 year old little girl to hang out but that experience was really just the icing on the cake for me.  Ruby means developer happiness and awesome community so why the disrespectful and crude language.  I don't care how you talk to your buddies or even your mom (okay, I would be disappointed if you talked to your mom like that too), but in a public forum, have some respect for common decency. 
&lt;br /&gt;&lt;br /&gt;
The irony of all this is that Matz himself was in attendance at MWRC.  When I hear Matz speak I don't see Rockstar, I see a Jedi Master who recognizes that it is the force that is strong and that he is just using it.  Matz is humble.  Matz is nice.  He should be the face of Ruby, but we are stuck with Rockstars and outspoken 'R-rated' personalities because they did some cool stuff using this awesome programming language that Matz created.&lt;br /&gt;
&lt;b&gt;end #module Rockstar&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;b&gt;module Mac&lt;/b&gt;&lt;br /&gt;
I don't own a Mac, I don't want to own a Mac, and I shouldn't need to own a Mac to program Ruby.
Be forewarned if asking for support for a Windows issue in most forums, especially for gems.  &quot;M$ Sucks! buy an F-ing Mac!&quot;  Whatever happened to open, cross platform development?  (I know, Windows isn't open, but neither is Mac)  Not to mention whatever happened to Matz Is Nice And So We Are Nice?  I personally prefer Ubuntu and only use Windows at work when that is what the client is using.  I dislike working on Windows but Ruby can make it better.  Fortunately there are some great people like Luis Lavena (&lt;a href=&quot;http://rubyinstaller.org&quot; target=&quot;_BLANK&quot;&gt;http://rubyinstaller.org&lt;/a&gt;) making great progress to give Ruby a better supported platform in Windows.  I use the tools necessary to get the job done and thanks to Luis and others, I have been able to use Ruby to do that.  Unfortunately there is still a lot of elitist snobbery that comes with module Mac that is associated with Ruby.&lt;br /&gt;
&lt;b&gt;end #module Mac&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;b&gt;module Rails&lt;/b&gt;&lt;br /&gt;
I personally think modules Rockstar and Mac are largely dependencies of Rails and not Ruby itself but Rails is the most tightly coupled module with Ruby.  It's hard to separate Ruby from Rails.  I like Rails.  I've written some Rails guides on this very blog.  At MWRC which is a Ruby conference, most of the attendees (probably 85% judging from the hands raised) are working with Rails.  There was even a talk about HTTP which has nothing to do with Ruby.  I still found that talk interesting, but HTTP is not Ruby.  Rails is not Ruby.  I don't fault the conference organizers or the speakers.  It is what it is.  Most people using Ruby are using Rails.  I may be in the minority when I say I think Ruby and Rails need to be decoupled but at least I'm in good company.  Matz spoke at MWRC and he said he wants to get Ruby off the web.  I completely agree.  Ruby is awesome,  Rails is awesome too, but Ruby is not Rails.&lt;br /&gt;
&lt;b&gt;end #module Rails&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Refactor...&lt;/b&gt;&lt;br /&gt;
Let's work on a decoupled Ruby that doesn't have dependencies on these modules.  They will still be available because some people like them, but they should not be required.  Here are some alternatives:
&lt;br /&gt;
&lt;b&gt;module MINASWAN&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;#Matz Is Nice And So We Are Nice&lt;br /&gt;
&lt;b&gt;end&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;module Jedi&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;#You have much to learn my young Padowan&lt;br /&gt;
&lt;b&gt;end&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;module NextBigApp&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;#The one you wrote that is not Rails and helps people see how powerful Ruby really is&lt;br /&gt;
&lt;b&gt;end&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ruby will be better for it and so will the community.
</description>
          <pubDate>Wed, 25 Aug 2010 22:59:05 GMT</pubDate>
          <guid>http://matt-hulse.heroku.com/articles/2010/08/25/ruby-is-too-tightly-coupled/</guid>
          <link>http://matt-hulse.heroku.com/articles/2010/08/25/ruby-is-too-tightly-coupled/</link>
        </item>
    
        <item>
          <title>Massaging Rails 3 Beta on Windows</title>
          <description>Ingredients: WinXP Pro, Ruby 1.9.1v243 (&lt;a href=&quot;http://rubyinstaller.org&quot;&gt;http://rubyinstaller.org&lt;/a&gt;)
&lt;br /&gt;
(Note: If you've installed an earlier version of bundler you'll need to 'gem uninstall bundler' first)
&lt;br /&gt;
&lt;h3&gt;Installing:&lt;/h3&gt;
Following the official &lt;a href='http://weblog.rubyonrails.org/2010/2/5/rails-3-0-beta-release' target=&quot;_BLANK&quot;&gt;instructions&lt;/a&gt; first we take care of some prerequisites:
&lt;pre class='code'&gt;
gem install tzinfo builder memcache-client rack rack-test rack-mount erubis mail text-format thor bundler i18n
&lt;/pre&gt;
&lt;br /&gt;
I started from scratch so I needed rake as well:
&lt;pre class='code'&gt;
gem install rake
&lt;/pre&gt;
&lt;br /&gt;
Now the big kahuna:
&lt;pre class='code'&gt;
gem install rails --pre
&lt;/pre&gt;
&lt;br /&gt;
At this point you have the official Rails 3 beta installed.  You'll want to check out all the posts going around documenting new changes in Rails 3, but for starters lets just start it up.
&lt;br /&gt;
&lt;h3&gt;Let'er rip&lt;/h3&gt;
Create a new rails app:
&lt;pre class='code'&gt;
rails rails3_beta
...
cd rails3_beta
&lt;/pre&gt;
&lt;br /&gt;
We need to let bundler take care of a few more dependencies now (note the new syntax, I dig it):
&lt;pre class='code'&gt;
bundle install
&lt;/pre&gt;
&lt;br /&gt;
Now we have what we need to run the server.
&lt;br /&gt;
According to the new documentation, ruby script\server and other script commands are now called directly with rails from the root of the rails app.  So 'rails server' should start up our webrick server on port 3000.  Remember this is beta, so don't be discouraged when this doesn't work on Windows.

&lt;pre class='code'&gt;
rails server #this doesn't work on Windows right now

c:/ruby19/lib/ruby/gems/1.9.1/gems/railties-3.0.0.beta/bin/rails:2: command not found: C:/rails3_beta/script/rails
...
in 'exec': No such file or directory - C:/rails3_beta/script/rails (Errno::ENOENT)
&lt;/pre&gt;
&lt;br /&gt;
&lt;h3&gt;-Hiccup-&lt;/h3&gt;
&lt;small&gt;(excuse me)&lt;/small&gt;
&lt;br /&gt;
The problem is, 'rails server' attempts to execute the file 'script\rails' directly.  Windows doesn't know what to do with this file because it has no extension.  (Windows doesn't understand she-bang lines like #!/usr/bin/env ruby.)  RubyInstaller has an option to associate .rb file extensions to the Ruby interpreter, allowing the execution of .rb files directly but that doesn't help us here because the file has no extension.  
&lt;br /&gt;
There are a few ways to deal with this:
&lt;ol style=&quot;margin-left:40px;&quot;&gt;
&lt;li&gt;
We could hack the railties bin\rails file to call this file with ruby.exe.
&lt;/li&gt;
&lt;li&gt;
We could hack the railties bin\rails file to call rails.rb and rename script\rails to script\rails.rb.  As long as we checked the box to associate .rb files with the Ruby interpreter while installing, this will work the way it was originally intended to.
&lt;/li&gt;
&lt;li&gt;In the short term, we can just substitute 'rails server' with 'ruby script\rails server', or 'rails generate scaffold test' with 'ruby script\rails generate scaffold test'.&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
So to run our new Rails3 app quick and dirty:
&lt;pre class='code'&gt;
ruby script\rails server
&lt;/pre&gt;
&lt;br /&gt;
you should now see the familiar webrick initialization and your server will be started on port 3000.
&lt;br /&gt;
&lt;h3&gt;Go get'em Tiger!&lt;/h3&gt;
Let's get in there and bang on it now, especially you folks on Windows.  The benevolent forces that have given us Rails3 will need our feedback if we are going to have a viable Ruby ecosystem on Windows.  If we don't tell them that we value a solid cross platform Rails experience, how will they know?
&lt;br /&gt;


&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Update&lt;/h3&gt;
For those who prefer a screencast, Simon Bohlin has recorded these steps and more which can be viewed &lt;a target=&quot;_blank&quot;  href=&quot;http://www.youtube.com/watch?v=0OvBHk4VUkc&quot;&gt;here&lt;/a&gt;.  His experience was that he need to run &quot;gem update --system&quot; before installing rails3.  (Actually by doing this, the first two steps are no longer necessary because RubyGems 1.3.6 fixes the issue with dependency resolution on prerelease gems.  I guess things have changed enough since this was posted to warrant a new article.) He also takes this article a step further and installs the sqlite3 gem which is the default db in rails.  Thanks Simon.</description>
          <pubDate>Fri, 05 Feb 2010 22:26:45 GMT</pubDate>
          <guid>http://matt-hulse.heroku.com/articles/2010/02/05/massaging-rails-3-beta-on-windows/</guid>
          <link>http://matt-hulse.heroku.com/articles/2010/02/05/massaging-rails-3-beta-on-windows/</link>
        </item>
    
        <item>
          <title>From Zero to Rails3 on Windows in 600 seconds</title>
          <description>[&lt;b&gt;Update:&lt;/b&gt;  &lt;h4&gt;Quite a lot has changed since this post was written.  See &lt;a href=&quot;http://matt-hulse.com/articles/2010/08/25/another-go-with-rails-3-on-windows/&quot;&gt;Another Go with Rails 3 on Windows&lt;/a&gt; for a more up to date Rails 3 on Windows guide.&lt;/h4&gt;]&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Some Prep Work&lt;/h3&gt;
Download and install the following:
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/msysgit/downloads/list&quot; target=&quot;_BLANK&quot;&gt;msysgit (Git for Windows)&lt;/a&gt; I'm using Git-1.6.5.1-preview20091022.exe&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://rubyinstaller.org/download.html&quot; target=&quot;_BLANK&quot;&gt;Ruby 1.9.1&lt;/a&gt; I'm using rubyinstaller-1.9.1-p243-rc1.exe (Make sure to select the option to add Ruby\bin to your path)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.sqlite.org/sqlitedll-3_6_22.zip&quot; target=&quot;_BLANK&quot;&gt;Sqlite3 dll&lt;/a&gt; extract this into the bin directory of your newly created Ruby installation (c:\ruby\bin or c:\ruby19\bin)&lt;/li&gt;
&lt;/ul&gt;

That probably took about 300 seconds so we'd better get moving...

&lt;br /&gt;
&lt;h3&gt;Showtime&lt;/h3&gt;
Create a new directory for your rails app.  Avoid spaces in the path.  I'll be using c:\Rails3App

Create a file called Gemfile in the root of your new directory with the following content:
&lt;pre class='code'&gt;
gem &quot;rails&quot;, git: &quot;git://github.com/rails/rails.git&quot;
git &quot;git://github.com/rails/arel.git&quot;
git &quot;git://github.com/rails/rack.git&quot;

require 'symlink' #hack to help bundler do it's thing on windows

#continue with other gems
gem 'rspec'
gem 'sqlite3-ruby'
&lt;/pre&gt;

Now create another file in the same directory called symlink.rb with the following:
&lt;pre class='code'&gt;
require 'FileUtils'
# File.symlink hack (no symlink on windows)
class File
  def File.symlink(a,b)
    FileUtils.cp_r(a,b,:preserve =&gt; false)
  end
end
&lt;/pre&gt;

(Bundler depends on symlink which isn't implemented on Windows.  This file provides a work around.)
&lt;br /&gt;
Now open cmd.exe and cd to your new rails app directory:
&lt;pre class='code'&gt;cd c:\Rails3App&lt;/pre&gt;

Install the new fangled bundler gem: &lt;pre class='code'&gt;gem install bundler&lt;/pre&gt;

Say the magic words: &lt;pre class='code'&gt;gem bundle&lt;/pre&gt;

Wait another 120 seconds and poof!  You've installed Rails3.  It's not installed like a normal gem though.  Bundler put all of those gems directly inside this directory so to use rails type &lt;pre class='code'&gt;bin\rails . -s&lt;/pre&gt;

This uses the vendored rails gem to fill out the rest of the rails app in the current directory.  Now when you view the contents of c:\Rails3App you will see a brand new rails3 application.

You should be able to start up your new application like normal: &lt;pre class='code'&gt;ruby script\server&lt;/pre&gt;

&lt;br /&gt;
&lt;h3&gt;The End&lt;/h3&gt;
Give it a test run.  This is still 3.0 pre alpha code so expect some hiccups but man, that was much easier than you thought it would be, right?</description>
          <pubDate>Sat, 30 Jan 2010 22:34:04 GMT</pubDate>
          <guid>http://matt-hulse.heroku.com/articles/2010/01/30/from-zero-to-rails3-on-windows-in-600-seconds/</guid>
          <link>http://matt-hulse.heroku.com/articles/2010/01/30/from-zero-to-rails3-on-windows-in-600-seconds/</link>
        </item>
    
        <item>
          <title>Heroku my Hero!</title>
          <description>&lt;p&gt;Thanks to Heroku for providing a great service.  I am now hosting this blog on Heroku via Radiant &lt;span class=&quot;caps&quot;&gt;CMS&lt;/span&gt; for free!  New content coming soon&amp;#8230;&lt;/p&gt;</description>
          <pubDate>Sat, 02 Jan 2010 21:05:01 GMT</pubDate>
          <guid>http://matt-hulse.heroku.com/articles/2010/01/02/heroku-my-hero/</guid>
          <link>http://matt-hulse.heroku.com/articles/2010/01/02/heroku-my-hero/</link>
        </item>
    
    
  </channel>
</rss>

