<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>fluctisonous - Home</title>
  <id>tag:fluctisonous.com,2008:mephisto/</id>
  <generator version="0.7.2" uri="http://mephistoblog.com">Mephisto Noh-Varr</generator>
  <link href="http://fluctisonous.com/feed/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://fluctisonous.com/" rel="alternate" type="text/html"/>
  <updated>2007-12-31T15:39:03Z</updated>
  <entry xml:base="http://fluctisonous.com/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:fluctisonous.com,2007-12-31:8540</id>
    <published>2007-12-31T15:38:00Z</published>
    <updated>2007-12-31T15:39:03Z</updated>
    <category term="interesting"/>
    <link href="http://fluctisonous.com/2007/12/31/about_openid" rel="alternate" type="text/html"/>
    <title>How OpenID works</title>
<summary type="html">&lt;p&gt;I stumbled upon this on youtube. It is the clearest explanation of OpenID I have come across.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;I stumbled upon this on youtube. It is the clearest explanation of OpenID I have come across.&lt;/p&gt;

&amp;lt;object height='373' width='425'&gt;&amp;lt;param name='movie' value='http://www.youtube.com/v/xcmY8Pk-qEk&amp;rel=0&amp;border=1'&gt;&amp;lt;/param&gt;&amp;lt;param name='wmode' value='transparent'&gt;&amp;lt;/param&gt;&amp;lt;embed type='application/x-shockwave-flash' src='http://www.youtube.com/v/xcmY8Pk-qEk&amp;rel=0&amp;border=1' height='373' wmode='transparent' width='425'&gt;&amp;lt;/embed&gt;&amp;lt;/object&gt;
          </content>  </entry>
  <entry xml:base="http://fluctisonous.com/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:fluctisonous.com,2007-11-08:8538</id>
    <published>2007-11-08T23:21:00Z</published>
    <updated>2007-11-09T12:48:09Z</updated>
    <category term="Rails"/>
    <category term="Ruby"/>
    <link href="http://fluctisonous.com/2007/11/8/where-has-my-gem_server-gone" rel="alternate" type="text/html"/>
    <title>Where has my gem_server gone?</title>
<summary type="html">&lt;p&gt;Is it me or are there some stupid holes in Leopard? I will get round to writing up making Time Machine back up to a NAS some other time, but today I wasted on rubygems. What were those good people at Apple thinking when they decided to strip out gem_server from an otherwise solid job of integrating Ruby into Leopard?&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;Is it me or are there some stupid holes in Leopard? I will get round to writing up making Time Machine back up to a NAS some other time, but today I wasted on rubygems. What were those good people at Apple thinking when they decided to strip out gem_server from an otherwise solid job of integrating Ruby into Leopard?&lt;/p&gt;
&lt;p&gt;First things first, if you want your gem_server back in Leopard report the &lt;em&gt;bug&lt;/em&gt; to &lt;a href='http://bugreporter.apple.com/'&gt;Apples Bug Reporter&lt;/a&gt;, enough voices and they will prioritise it.&lt;/p&gt;
&lt;p&gt;Enough moaning, it is late and I want to drop this little tip while I still remember what I did so no other poor soul has to whittle away their time working out how to fill this pointless gap.&lt;/p&gt;
&lt;p&gt;My first mistake was to think that the usual; &lt;/p&gt;&lt;pre&gt;&lt;code&gt;sudo gem update --system&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Don&amp;apos;t even think about doing this&lt;/strong&gt;, but if you do and find yourself with an empty repository, all is not lost. You can get things back in order by putting the following into .gemrc in your home folder;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
gemhome:
- /Library/Ruby/Gems/1.8
gempath:
- /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Lets go get your gem_server. First things first, check your .profile has /opt/local/bin at the front of your PATH, and add the GEM_PATH and GEM_HOME. Your .profile should look something similar to mine;
&lt;pre&gt;&lt;code&gt;
export PATH=&quot;/opt/local/bin:/opt/local/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH&quot;
export PATH=&quot;~/bin:$PATH&quot;
alias cap1=&quot;`which cap` _1.4.1_&quot;
export GEM_PATH=&quot;/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8:/Library/Ruby/Gems/1.8&quot;
export GEM_HOME=&quot;/Library/Ruby/Gems/1.8&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now let&amp;apos;s install a working RubyGems. Download &lt;a href='http://rubyforge.org/frs/download.php/20989/rubygems-0.9.4.tgz'&gt;rubygems&lt;/a&gt; and unpack it to /opt/local/src/rubygems-0.9.4. Now lets build it.&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;
$ export GEM_HOME=/Library/Ruby/Gems/1.8
$ ruby setup.rb config --prefix=/opt/local
$ ruby setup.rb setup
$ ruby setup.rb install
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You should now have a working gem_server, it will only be able to show you the gems you have installed and will ignore the ones pre installed by Apple, but if you want to view those all you have to do is;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
$ export GEM_HOME=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
$ gem_server
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Apparently instead of doing all of this, you can simply copy gem_server from the
RubyGems distribution to /usr/bin. I haven&amp;apos; tried &lt;a href='http://www.talkaboutprogramming.com/group/comp.lang.ruby/messages/259207.html'&gt;this&lt;/a&gt; but Laurent Sansonetti you can create it yourself:&lt;/p&gt;
&lt;code&gt;&lt;pre&gt;
  #!/usr/bin/env ruby
  require 'rubygems/server'
  Gem::Server.run ARGV
&lt;/pre&gt;&lt;/code&gt;
          </content>  </entry>
  <entry xml:base="http://fluctisonous.com/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:fluctisonous.com,2006-12-03:47</id>
    <published>2006-12-03T23:06:00Z</published>
    <updated>2007-08-31T12:59:15Z</updated>
    <category term="How to..."/>
    <category term="Rails"/>
    <link href="http://fluctisonous.com/2006/12/3/deploy-mephisto-on-rails-rc1-with-capistrano" rel="alternate" type="text/html"/>
    <title>Deploy Mephisto on Rails RC1 with Capistrano</title>
<summary type="html">&lt;p&gt;Having got my &lt;a href='http://fluctisonous.com/2006/11/19/moving-home-with-capistrano-on-site5'&gt;Mephisto deployment humming sweetly with Capistrano&lt;/a&gt; those smart guys in the Rails core team went and released &lt;a href='http://weblog.rubyonrails.org/2006/11/23/rails-1-2-release-candidate-1'&gt;Rails 1.2 Release Candidate 1&lt;/a&gt;. I have create a rake task to allow the deploy to use a shared RC1 environment.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;Having got my &lt;a href='http://fluctisonous.com/2006/11/19/moving-home-with-capistrano-on-site5'&gt;Mephisto deployment humming sweetly with Capistrano&lt;/a&gt; those smart guys in the Rails core team went and released &lt;a href='http://weblog.rubyonrails.org/2006/11/23/rails-1-2-release-candidate-1'&gt;Rails 1.2 Release Candidate 1&lt;/a&gt;. I have create a rake task to allow the deploy to use a shared RC1 environment.&lt;/p&gt;
&lt;p&gt;My previous article on deploying Mephisto with Capistrano received some useful feedback which I have included in this updated deploy recipe. In escence I have added support to run off Rail 1.2 RC1, refined the deploy task and moved the assets, themes and cache into the shared/ folder;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# This defines a deployment &quot;recipe&quot; that you can feed 
# to capistrano. It allows you to automate
# (among other things) the deployment of your application.
# (http://manuals.rubyonrails.com/read/book/17). 

# ============================================================
# REQUIRED VARIABLES
# ============================================================

set :application, &quot;YourRailsApp&quot; 

set :repository, 
       &quot;http://svn.techno-weenie.net/projects/mephisto/tags/rel-0.7.3/&quot;

# ============================================================
# OPTIONAL VARIABLES
# ============================================================
set :user, &quot;foo&quot;               # your site5 username
set :deploy_to, &quot;/home/#{user}/sites/#{application}&quot;
set :password, &quot;whatever&quot;      # your site5 password
set :domain, &quot;domain.com&quot;      # your applications domain name
set :deploy_server, &quot;you.server.name&quot; # the url of your server 
set :use_sudo, false
set :rails_env, &quot;production&quot; 
# set :rails_version, 5559       # the edge rails version.
set :rails_tag, &quot;rel_1-2-0_RC1&quot;  # the tag to deploy against

set :public_html, &quot;/home/#{user}/public_html&quot; 
# this is  your public_html for a primary domain
# for a sub-domain it would be 
# &quot;/home/#{user}/public_html/#{application}&quot; 

# ============================================================
# ROLES
# ============================================================

role :app, deploy_server
role :web, deploy_server
role :db, deploy_server, :primary =&gt; true

# ============================================================
# TASKS
# ============================================================

desc &quot;Restart the web server. Overrides the default task for Site5 use&quot;
task :restart, :roles =&gt; :app do
    run &quot;killall -q dispatch.fcgi&quot;
end

task :after_setup, :roles =&gt; :app do
  run &amp;lt;&amp;lt;-cmd mv&gt; :app do
  put(File.read('lib/tasks/shared_rails.rake'), &quot;#{release_path}/lib/tasks/shared_rails.rake&quot;, :mode =&gt; 0755)
  put(File.read('config/database.yml'), 
    &quot;#{release_path}/config/database.yml&quot;, :mode =&gt; 0444)
  put(File.read('public/.htaccess'), 
    &quot;#{release_path}/public/.htaccess&quot;, :mode =&gt; 0755)
  put(File.read('public/dispatch.fcgi'), 
    &quot;#{release_path}/public/dispatch.fcgi&quot;, :mode =&gt; 0755)
  run &amp;lt;&amp;lt;-cmd cd&gt;&amp;lt;&amp;lt;-eof svn co svn: /&gt;&amp;lt;&amp;lt;-eof cd&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I've included an export of tzinfo 0.3.2 for good measure, if you don't want a frozen copy of tzinfo then remove the svn export and symlink from the &lt;em&gt;after_update_code&lt;/em&gt; task. The major change from the previous article is the inclusion of a new rake task &lt;em&gt;deploy_shared_rails&lt;/em&gt; in place of &lt;em&gt;deploy_edge&lt;/em&gt;. The updated version of Rick Olson's deploy_edge adds the  option to deploy against a tag of the rails source: TAG=tag_version. Add the rake file to your local rails applications tasks folder;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;lib/tasks/shared_rails.rake&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Paste the following code into the shared_rails.rake file;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;desc &quot;deploy shared rails environment&quot;
task :deploy_shared_rails do
  
  ENV['SHARED_PATH']  = '../../shared' unless ENV['SHARED_PATH']
  ENV['RAILS_PATH'] ||= File.join(ENV['SHARED_PATH'], 'rails')
  svn_root = &quot;http://dev.rubyonrails.org/svn/rails/&quot;
  symlink_path  = 'vendor/rails'

  if ENV['TAG']
    rails_svn = &quot;#{svn_root}/tags/#{ENV['TAG']}&quot;
    export_path = &quot;#{ENV['RAILS_PATH']}/tag_#{ENV['TAG']}&quot;
  else
    rails_svn = &quot;#{svn_root}/trunk&quot;
    if ENV['REVISION'].nil?
      ENV['REVISION'] = /^r(\d+)/.match(%x{svn -qr HEAD log #{svn_root}})[1]
      puts &quot;REVISION not set. Using HEAD, which is revision #{ENV['REVISION']}.&quot;
    end
    export_path = &quot;#{ENV['RAILS_PATH']}/rev_#{ENV['REVISION']}&quot;   
    checkout_path = File.join(ENV['RAILS_PATH'], 'trunk')

    # do we need to checkout the file?
    unless File.exists?(checkout_path)
      puts 'setting up rails trunk'    
      get_framework_for checkout_path do |framework|
        system &quot;svn co #{rails_svn}/#{framework}/lib #{checkout_path}/#{framework}/lib --quiet&quot;
      end
    end
  end
      
  # do we need to export the revision?
  unless File.exists?(export_path)
    puts &quot;setting up rails &quot; + (ENV['TAG'] ? &quot;tag #{ENV['TAG']}&quot; : &quot;rev #{ENV['REVISION']}&quot;)
    get_framework_for export_path do |framework|
      if ENV['TAG']
        system &quot;svn export #{rails_svn}/#{framework}/lib #{export_path}/#{framework}/lib&quot;
      else  
        system &quot;svn up #{checkout_path}/#{framework}/lib -r #{ENV['REVISION']} --quiet&quot;
        system &quot;svn export #{checkout_path}/#{framework}/lib #{export_path}/#{framework}/lib&quot;
      end
    end
  end

  puts 'linking rails'
  rm_rf   symlink_path
  mkdir_p symlink_path

  get_framework_for symlink_path do |framework|
    ln_s File.expand_path(&quot;#{export_path}/#{framework}/lib&quot;), &quot;#{symlink_path}/#{framework}/lib&quot;
  end
  
  touch symlink_path + (ENV['TAG'] ? &quot;/TAG_#{ENV['TAG']}&quot; :  &quot;/REVISION_#{ENV['REVISION']}&quot;)
end

def get_framework_for(*paths)
  %w( railties actionpack activerecord actionmailer activesupport activeresource ).each do |framework|
    paths.each { |path| mkdir_p &quot;#{path}/#{framework}&quot; }
    yield framework
  end
end
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This shared_rails.rake file can also be downloaded from &lt;a href='http://pastie.caboo.se/25554'&gt;pastie&lt;/a&gt;. With these upadates in place you can now do the deploy as per my previous article. For the first time deploy;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;rake deploy BOOTSTRAP=true&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and all subsequent ones;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;rake deploy&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Let me know if you have any problems with the deploy and I will update the deploy accordingly.&lt;/p&gt;
&lt;p&gt;Technorati Tags: &lt;a href='http://technorati.com/tag/rails'&gt;rails&lt;/a&gt;, &lt;a href='http://technorati.com/tag/capistrano'&gt;capistrano&lt;/a&gt;, &lt;a href='http://technorati.com/tag/mephisto'&gt;mephisto&lt;/a&gt;
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://fluctisonous.com/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:fluctisonous.com,2006-11-19:30</id>
    <published>2006-11-19T22:57:00Z</published>
    <updated>2007-09-26T15:59:43Z</updated>
    <category term="How to..."/>
    <category term="Rails"/>
    <link href="http://fluctisonous.com/2006/11/19/moving-home-with-capistrano-on-site5" rel="alternate" type="text/html"/>
    <title>Moving home... with Capistrano on Site5</title>
<summary type="html">&lt;p&gt;I recently took the plunge and moved this Mephisto site from Textdrive to Site5, taking the opportunity to deploy it with &lt;a href='http://weblog.jamisbuck.org/'&gt;Jamis Buck's&lt;/a&gt; Capistrano.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;I recently took the plunge and moved this Mephisto site from Textdrive to Site5, taking the opportunity to deploy it with &lt;a href='http://weblog.jamisbuck.org/'&gt;Jamis Buck's&lt;/a&gt; Capistrano.&lt;/p&gt;
&lt;p&gt;This site has been running on Textdrive since I installed the 0.6 Immortus release of &lt;a href='http://mephistoblog.com/'&gt;Mephisto&lt;/a&gt;. Textdrive has always been helpful and they have an excellent forum but their shared hosting has a memory limit of 48mb. Mephisto is built to run on Rails 1.2 which has developed a larger footprint than the current 1.1.6. Since upgrading to edge Mephisto which requires edge Rails I have pushed the site over Textdrive's memory so the fcgi process keeps being killed. I have got fed up with trying to find ways to keep the memory usage down and so this weekend I moved over to my Site5 account.&lt;/p&gt;
&lt;p&gt;In the past I had had some trouble getting Mephisto to run under Site5 so spent some time getting the thing right. I have documented the process here so it should make things easier for other Site5 customers.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create the domain in cPanel.&lt;/li&gt;
&lt;li&gt;Create the database in cPanel and create a database user. If your site5 account name is foo and the username you created is bar your full database username will be foo_bar.&lt;/li&gt;
&lt;li&gt;Create a new rails app on your local machine;&lt;/li&gt;
&lt;pre&gt;&lt;code&gt;rails YourRailsApp&lt;/code&gt;&lt;/pre&gt;
&lt;li&gt;If you haven't got capistrano installed;&lt;/li&gt;
&lt;pre&gt;&lt;code&gt;gem install capistrano&lt;/code&gt;&lt;/pre&gt;
&lt;li&gt;Install capistrano into you rails application;&lt;/li&gt;
&lt;pre&gt;&lt;code&gt;cap --apply-to path/to/YourApplication&lt;/code&gt;&lt;/pre&gt;
&lt;li&gt;Create a database.yml file in your rails applications /config directory;&lt;/li&gt;
&lt;pre&gt;&lt;code&gt;login: &amp;login
  adapter: mysql
  host: localhost
  username: foo_bar
  password: yourpassword

development:
  database: foo_yourapp_dev
  &amp;lt;&amp;lt;:&gt;&amp;lt;&amp;lt;:&gt;&amp;lt;&amp;lt;:&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;li&gt;Edit the deploy.rb file while you are still in the applications /config directory. You will need to put your site5 username and password, the version of Mephisto you want to install and the version of Rails edge to use. You will also need your domain name you created at the start, and the fully qualified name of the server you are deploying to. These all go under REQUIRED and OPTIONAL variables sections;&lt;/li&gt;
&lt;pre&gt;&lt;code&gt;# This defines a deployment &quot;recipe&quot; that you can feed 
# to capistrano. It allows you to automate
# (among other things) the deployment of your application.
# (http://manuals.rubyonrails.com/read/book/17). 

# ============================================================
# REQUIRED VARIABLES
# ============================================================

set :application, &quot;YourRailsApp&quot;  # application name from step 3
# without the tld for mydomain.com it would just be mydomain

set :repository, &quot;http://svn.techno-weenie.net/projects/mephisto/trunk/&quot;   
# the edge Mephisto
# you may want use the latest stable instead; 
# http://svn.techno-weenie.net/projects/mephisto/tags/rel-0.7.2

# ============================================================
# OPTIONAL VARIABLES
# ============================================================
set :user, &quot;foo&quot;               # your site5 username
set :deploy_to, &quot;/home/#{user}/sites/#{application}&quot;
set :password, &quot;whatever&quot;      # your site5 password
set :domain, &quot;domain.com&quot;      # your applications domain name
set :deploy_server, &quot;you.server.name&quot; # the url of your server 
set :use_sudo, false
set :rails_env, &quot;production&quot; 
set :rails_version, 5559       # the edge rails version.

# this is  your public_html for a primary domain
set :public_html, &quot;/home/#{user}/public_html&quot; 

# for a sub-domain it would be 
# &quot;/home/#{user}/public_html/#{application}&quot; 

# ============================================================
# ROLES
# ============================================================

role :app, deploy_server
role :web, deploy_server
role :db, deploy_server, :primary =&gt; true

# ============================================================
# TASKS
# ============================================================

desc &quot;Restart the web server. Overrides the default task for Site5 use&quot;
task :restart, :roles =&gt; :app do
    run &quot;killall -q dispatch.fcgi&quot;
end

task :after_setup, :roles =&gt; :app do
  run &amp;lt;&amp;lt;-cmd mv&gt; :app do
  put(File.read('config/database.yml'), 
    &quot;#{release_path}/config/database.yml&quot;, :mode =&gt; 0444)
  put(File.read('public/.htaccess'), 
    &quot;#{release_path}/public/.htaccess&quot;, :mode =&gt; 0755)
  put(File.read('public/dispatch.fcgi'), 
    &quot;#{release_path}/public/dispatch.fcgi&quot;, :mode =&gt; 0755)
  run &amp;lt;&amp;lt;-cmd cd&gt;&amp;lt;&amp;lt;-eof cd&gt;&amp;lt;&amp;lt;-eof cd&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;li&gt;Edit the .htaccess file under the applications /public directory;&lt;/li&gt;
&lt;pre&gt;&lt;code&gt;AddHandler fastcgi-script .fcgi
AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI

RewriteEngine On

RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

ErrorDocument 500 &quot;&amp;lt;h2&amp;gt;Application error&amp;lt;/h2&amp;gt;Rails application failed to start properly&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;li&gt;Edit the dispatch.fcgi file while you are still under the applications /public directory;&lt;/li&gt;
&lt;pre&gt;&lt;code&gt;
#!/usr/bin/ruby

# set the rails environment to production
ENV['RAILS_ENV'] = 'production'
require File.dirname(__FILE__) + &quot;/../config/environment&quot;
require 'fcgi_handler'

RailsFCGIHandler.process!
&lt;/code&gt;&lt;/pre&gt;
&lt;li&gt;We are now be ready to setup the server in preparation for the deploy;&lt;/li&gt;
&lt;pre&gt;&lt;code&gt;rake remote:exec ACTION=setup&lt;/code&gt;&lt;/pre&gt;
&lt;li&gt;The first deploy is special as we want to run the Mephisto db:bootstrap;&lt;/li&gt;
&lt;pre&gt;&lt;code&gt;rake deploy BOOTSTRAP=true&lt;/code&gt;&lt;/pre&gt;
&lt;/ol&gt;
&lt;p&gt;That is pretty much it. Next time you want to update the installation;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;rake deploy&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can find the&lt;a href='http://manuals.rubyonrails.com/read/book/17'&gt;Capistrano documentation&lt;/a&gt; and there is a useful cheatsheet at &lt;a href='www.dizzy.co.uk/cheatsheets'&gt;dizzy.co.uk&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; I have an updated deploy.rb &lt;a href='http://fluctisonous.com/2006/12/3/deploy-mephisto-on-rails-rc1-with-capistrano'&gt;here&lt;/a&gt; that fixes a couple of issues and lets you to deploy against rails 1.2.&lt;/p&gt;
&lt;p&gt;Technorati Tags: &lt;a href='http://technorati.com/tag/rails'&gt;rails&lt;/a&gt;, &lt;a href='http://technorati.com/tag/capistrano'&gt;capistrano&lt;/a&gt;, &lt;a href='http://technorati.com/tag/mephisto'&gt;mephisto&lt;/a&gt;
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://fluctisonous.com/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:fluctisonous.com,2006-10-15:29</id>
    <published>2006-10-15T23:46:00Z</published>
    <updated>2006-10-19T06:06:09Z</updated>
    <category term="microformats"/>
    <category term="Rails"/>
    <category term="Ruby"/>
    <link href="http://fluctisonous.com/2006/10/15/microformats-in-the-heart-of-rails" rel="alternate" type="text/html"/>
    <title>Microformats in the heart of Rails</title>
<summary type="html">&lt;p&gt;It has been a quiet period here, so I thought I should drop a note on what I have been up to in the weeks since RailsConf Europe. Having been to &lt;a href='http://2006.dconstruct.org/'&gt;d.construct&lt;/a&gt; and &lt;a href='http://europe.railsconf.org/'&gt;RailsConf Europe&lt;/a&gt; within a few weeks of each other, I came back from each with clear intent to act on the aspects that most impacted me.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;It has been a quiet period here, so I thought I should drop a note on what I have been up to in the weeks since RailsConf Europe. Having been to &lt;a href='http://2006.dconstruct.org/'&gt;d.construct&lt;/a&gt; and &lt;a href='http://europe.railsconf.org/'&gt;RailsConf Europe&lt;/a&gt; within a few weeks of each other, I came back from each with clear intent to act on the aspects that most impacted me.&lt;/p&gt;
&lt;p&gt;From d.construct I came away with passions a-stirred about &lt;a href='http://www.microformats.org'&gt;Microformats&lt;/a&gt; .If you are new to the idea of Microformats there is a good introduction over at &lt;a href='http://www.whymicroformats.com'&gt;Why Microformats&lt;/a&gt;. &lt;a href='http://adactio.com/'&gt;Jeremy Keith&lt;/a&gt; did an excellent presentation on the subject at d.construct and then followed it up with an informal lunch and learn session in Brighton's Pavilion Gardens.&lt;/p&gt;
&lt;p&gt;Rails Conf Europe was full of interesting people and excellent presentations that have been commented on &lt;a href='http://www.loudthinking.com/arc/000599.html'&gt;here&lt;/a&gt; and &lt;a href='http://woss.name/index.php?s=RailsConf+Europe+2006'&gt;there&lt;/a&gt;. The overarching theme I came away with was that it is up to the Rails community to take Rails to the next level. The core team seems to have an appetite to look at what can come out of core and be turned into plugins. There were some excellent plugins demonstrated, I particularly liked &lt;a href='http://www.danwebb.net/'&gt;Dan Webb's&lt;/a&gt; &lt;a href='http://www.ujs4rails.com/'&gt;unobtrusive Javascript plugin&lt;/a&gt; not only for the technical merit, but because this is a subject that had drawn a large amount of debate in the community. Rails traditionally spews out large amounts of inline Javascript, instead of whining about this, Dan and &lt;a href='http://www.lukeredpath.co.uk/'&gt;Luke Redpath&lt;/a&gt; just got on and produced what DHH referred to as &lt;em&gt;&quot;the most professionally produced plugin I have seen&quot;.&lt;/em&gt; Fueled by a vitriolic but well pointed rant by Mr. Heinemeier Hansson and a passionate and rousing call to arms (or code) by &lt;a href='http://blogs.pragprog.com/cgi-bin/pragdave.cgi'&gt;Dave Thomas&lt;/a&gt;, I left RailsConf Europe determined to step my rails efforts and contributions up a notch or three.&lt;/p&gt;
&lt;p&gt;Over the last few weeks since d.construct I had been looking at Microformats and was becoming increasingly of the opinion that, to get beyond the random popping of Microformats into FLIKR and the odd blog or Technorati tag, applications need to be coded with Microformats in mind. In fact, to get the community really embracing them, Microformats need to be easier to use than to ignore. What better place to start than Rails which is creating a stampede of new web applications. Although there are tools-a-plenty to &lt;a href='http://rubyforge.org/projects/uformats/'&gt;parse them&lt;/a&gt;, there is not much about to really get them into the heart of a rails application. This was the catalyst for me to embark on the venture that has consumed the few spare hours I've had since RailsConf. In the next couple of weeks I will be putting an early release of a plugin to embed Microformats in the core of applications.&lt;/p&gt;
&lt;p&gt;The &lt;a href='http://rubyforge.org/projects/microformats/'&gt;Microformats plugin&lt;/a&gt; will let you;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;define microformats structures using a &lt;a href='http://en.wikipedia.org/wiki/Domain-specific_programming_language'&gt;Domain Specific Language&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;generate database migrations to build your database&lt;/li&gt;
&lt;li&gt;generate database models&lt;/li&gt; 
&lt;li&gt;generate view helpers to render the microformats&lt;/li&gt;
&lt;/ul&gt;
The &lt;acronym title='Domain Specific Language'&gt;DSL&lt;/acronym&gt; makes it easy to alter existing and add new microformats or even your own structures. Here is an example of an early definition for hReview;
&lt;pre&gt;&lt;code&gt;
class HReview &amp;lt; Microformats::Base
  
  rating_options = { 1 =&gt; :worst, 2 =&gt; 2, 3 =&gt; 3, 4 =&gt; 4, 5 =&gt; :best }
  type_options = %w( product business event person place website url )

  has_one :version
  has_one :summary
  has_one :type, :required =&gt; true, :length =&gt; 10, 
    :select_from =&gt; type_options
  has_one :item, :type =&gt; :pseudoformat
  has_one :dtreviewed, :type =&gt; :datetime
  has_many :ratings, :type =&gt; :integer, 
    :select_from =&gt; rating_options
  has_one :description, :type =&gt; :string, :length =&gt; 255
  has_one :permalink, :type =&gt; :url
  has_one :hcard, :type =&gt; :uformat
  has_many :tags
  has_one :license, :type =&gt; :uformat

end
&lt;/code&gt;&lt;/pre&gt;

As yet it is missing the syntax to define some of the presentation information for the helpers, but this gives a flavour of the emerging language.

I will be doing another post on this shortly when I have uploaded initial code to rubyforge.

&lt;p&gt;Technorati Tags: &lt;a href='http://technorati.com/tag/dconstruct06'&gt;dconstruct06&lt;/a&gt;, &lt;a href='http://technorati.com/tag/dconstruct'&gt;dconstruct&lt;/a&gt;, &lt;a href='http://technorati.com/tag/rails'&gt;rails&lt;/a&gt;, &lt;a href='http://technorati.com/tag/ruby'&gt;ruby&lt;/a&gt;, &lt;a href='http://technorati.com/tag/microformats'&gt;microformats&lt;/a&gt;
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://fluctisonous.com/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:fluctisonous.com,2006-09-09:18</id>
    <published>2006-09-09T17:07:00Z</published>
    <updated>2006-09-09T18:13:33Z</updated>
    <category term="What's happening"/>
    <link href="http://fluctisonous.com/2006/9/9/d-construct-left-me-naked-wet-and-exhausted" rel="alternate" type="text/html"/>
    <title>d.construct left me naked, wet and exhausted.</title>
<content type="html">
            &lt;p&gt;What a fantastic conference. d.construct 2006 may have been bigger than last year but it retains that grass roots feel. &lt;a href='http://adactio.com/'&gt;Jeremy Keith&lt;/a&gt; delivered the best presentation with great passion and humour and then followed it up with a lunchtime talk on &lt;a href='http://microformats.org/'&gt;microformats&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I expected a little fun at the after show party, which -like the conference itself- didn't disappoint.  I don't think I have never come away from a conference with so many memories of so many fun people. Look out for these people they are a lot of fun; 
&lt;div class='vcard'&gt;
&lt;a href='http://www.bumblesearch.com/blog/' class='url n fn'&gt;
&lt;span class='given-name'&gt;Andy&lt;/span&gt; &lt;span class='family-name'&gt;Mitchell&lt;/span&gt; &lt;/a&gt;&lt;/div&gt;
&lt;div class='vcard'&gt;
&lt;a href='http://www.tomanthony.co.uk/blog/' class='url n fn'&gt;
&lt;span class='given-name'&gt;Tom&lt;/span&gt; &lt;span class='family-name'&gt;Anthony&lt;/span&gt; &lt;/a&gt;&lt;/div&gt;
&lt;div class='vcard'&gt;
&lt;a href='http://wwww.binaryfire.com/elemental/' class='url n fn'&gt;
&lt;span class='given-name'&gt;Stuart&lt;/span&gt; &lt;span class='family-name'&gt;Gray&lt;/span&gt; &lt;/a&gt;&lt;/div&gt;
&lt;div class='vcard'&gt;
&lt;a href='http://www.sheilafarrell.com/' class='url n fn'&gt;
&lt;span class='given-name'&gt;Sheila&lt;/span&gt; &lt;span class='family-name'&gt;Farrell&lt;/span&gt; &lt;/a&gt;&lt;/div&gt;
&lt;div class='vcard'&gt;
&lt;a href='http://sourcebottle.net/' class='url n fn'&gt;
&lt;span class='given-name'&gt;Chris&lt;/span&gt; &lt;span class='family-name'&gt;Korhonen&lt;/span&gt; &lt;/a&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;As for the naked, wet and exhausted, Flikr has ruined my reputation.&lt;/p&gt;
&lt;p&gt;Technorati Tags: &lt;a href='http://technorati.com/tag/dconstruct06'&gt;dconstruct06&lt;/a&gt;, &lt;a href='http://technorati.com/tag/dconstruct'&gt; dconstruct&lt;/a&gt;
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://fluctisonous.com/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:fluctisonous.com,2006-09-07:12</id>
    <published>2006-09-07T08:24:00Z</published>
    <updated>2006-09-07T17:22:55Z</updated>
    <category term="What's happening"/>
    <link href="http://fluctisonous.com/2006/9/7/gotta-get-an-enigmatic-avatar-picture" rel="alternate" type="text/html"/>
    <title>Gotta get an enigmatic avatar picture.</title>
<content type="html">
            &lt;p&gt;&lt;a href='http://www.dconstruct.org'&gt;d.construct 2006&lt;/a&gt; is upon us, literally for me as a Brighton resident. This has been an excellently organised event and it hasn’t even started. The guys at &lt;a /&gt;Clearleft&lt;/a&gt; have done a fantastic job of making it more than a conference.&lt;/p&gt;
&lt;p&gt;There was a lot of positive feedback from last year which means high expectations for this year, the line-up looks excellent; &lt;a /&gt;Jeffrey Veen&lt;/a&gt;, &lt;a /&gt;Jeremy Keith&lt;/a&gt;, &lt;a /&gt;Derek Featherstone&lt;/a&gt; and &lt;a /&gt;Aral Balkan&lt;/a&gt; have all caught my attention, but I am sure I will get something valuable from every session.&lt;/p&gt;
&lt;p&gt;If the quality of the speaker line-up wasn’t enough, Jeremy has been rattling out some brief podcasts the whet our appetites which seems to have done the trick for me. Bundle in the pre and post show drinks and a few side events to boot, it all adds up to a great package with change from £100 to get some beers in too.&lt;/p&gt;
&lt;p&gt;One of the extras for the conference is the backnetwork setup by &lt;a /&gt;Madgex&lt;/a&gt; another Brighton based company. Backnetwork as you may guess is a networking site for the conference attendees; create a profile and link to others they know and pop up a thumbnail. A large number went straight on and registered their details, so within a day there was quite a collection, but looking at the variety of pictures chosen, I am not sure I will recognise anybody; it strikes me I am going to have to get one of those enigmatic shots of myself casually leaning at a jaunty angle just to fit in.&lt;/p&gt;
&lt;p&gt;Just realised I have rambled enough, see you in Heist some time tonight.&lt;/p&gt;
&lt;p&gt;Technorati Tags: &lt;a href='http://technorati.com/tag/dconstruct06'&gt;dconstruct06&lt;/a&gt;, &lt;a href='http://technorati.com/tag/dconstruct'&gt; dconstruct&lt;/a&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://fluctisonous.com/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:fluctisonous.com,2006-09-05:9</id>
    <published>2006-09-05T10:00:00Z</published>
    <updated>2006-10-17T00:13:29Z</updated>
    <category term="Rails"/>
    <category term="Ruby"/>
    <category term="What's happening"/>
    <link href="http://fluctisonous.com/2006/9/5/ruby-by-the-pier" rel="alternate" type="text/html"/>
    <title>Ruby by the pier</title>
<summary type="html">&lt;p&gt;Ruby has been gaining a lot of attention lately in the web development world especially with all the interest the prodigal son Rails has rightly drawn. Brighton has an established development community which is growing with the help of  high profile events such as &lt;a href='http://2006.dconstruct.org/'&gt;d.construct&lt;/a&gt;. I know a few people in Brighton with enough of an interest in Ruby to justify a meeting up for a bit of banter over a few beers what more of an excuse do you need...&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;Ruby has been gaining a lot of attention lately in the web development world especially with all the interest the prodigal son Rails has rightly drawn. Brighton has an established development community which is growing with the help of  high profile events such as &lt;a href='http://2006.dconstruct.org/'&gt;d.construct&lt;/a&gt;. I know a few people in Brighton with enough of an interest in Ruby to justify a meeting up for a bit of banter over a few beers what more of an excuse do you need...&lt;/p&gt;
&lt;p&gt;&lt;a href='http://translate.google.com/translate?u=http%3A%2F%2Fwww.rubyist.net%2F%7Ematz%2F&amp;langpair=ja%7Cen&amp;hl=en&amp;ie=UTF-8&amp;oe=UTF-8&amp;prev=%2Flanguage_tools'&gt;Matz&lt;/a&gt; and &lt;a href='http://www.loudthinking.com'&gt;David Heinemeier Hansson&lt;/a&gt; both talk about making programming a pleasure, I think we can extend that philosophy in Brighton the way we do it best, over a few drinks of an evening.&lt;/p&gt; 
&lt;p&gt;I am planning to start a ruby meet-up in Brighton, you know the format; a little knowledge sharing, maybe a guest speaker and some socializing.&lt;/p&gt;
&lt;p&gt;I would like to use this post to guage the local appetite and see what topics people are interested in. If you are near the south coast and fancy meeting up occasionally to share ideas, experiences or just drinks I would like to hear from you. Even if you don't know anything about Ruby or Rails and just want to find out more, please drop me note using the comment form.&lt;/p&gt;
&lt;p&gt;Technorati Tags: &lt;a href='http://technorati.com/tag/dconstruct06'&gt;dconstruct06&lt;/a&gt;, &lt;a href='http://technorati.com/tag/rails'&gt; rails&lt;/a&gt;, &lt;a href='http://technorati.com/tag/dconstruct'&gt; dconstruct&lt;/a&gt;, &lt;a href='http://technorati.com/tag/ruby'&gt; ruby&lt;/a&gt;
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://fluctisonous.com/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:fluctisonous.com,2006-09-02:5</id>
    <published>2006-09-02T00:26:00Z</published>
    <updated>2006-09-05T23:01:12Z</updated>
    <category term="How to..."/>
    <link href="http://fluctisonous.com/2006/9/2/fsg3-a-neat-little-svn-server" rel="alternate" type="text/html"/>
    <title>FSG3 a neat little SVN server</title>
<summary type="html">&lt;p&gt;How to turn a NAS drive into an always on Subversion server.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;How to turn a NAS drive into an always on Subversion server.&lt;/p&gt;
&lt;p&gt;I regularly work across a number of machines. For the heavy lifting and anything Adobe, there is a dual processor beast with a SCSI raid array running XP. When the sun is shining I have a little old laptop for development in the garden, and for anything else there is an old dual processor box running Linux.&lt;/p&gt;
&lt;p&gt;I spend a lot of my time working in Rails and rely heavily on Subversion for version control. Some time ago I bought myself a little &lt;a href='http://www.freecom.com/ecproduct_detail.asp?ID=2347'&gt;Freecom FSG3&lt;/a&gt; to give me some backup storage (and to dump all my mp3's on). It is a great little box and serves this purpose well.&lt;/p&gt;
&lt;p&gt;I was getting sick of having to boot up the beast just to access my Subversion repository, what's more the beast is in our spare room and we regularly have visitors whom I don't like to subject to the sound of 5 SCSI drives grinding away like a hammer drill. A little investigation revealed the FSG runs Linux and has an &lt;a href='http://www.openfsg.org'&gt;active community&lt;/a&gt; behind it. After some experimentation I was able to get Subversion up and running. I published a &lt;a href='http://www.openfsg.org/index.php/Install_Subversion'&gt;short article&lt;/a&gt; showing how to get this working.&lt;/p&gt;
&lt;p&gt;Now whenever I have been working on a project I just commit my changes to the repository without having to boot the server so I always have an effortless backup.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://fluctisonous.com/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:fluctisonous.com,2006-09-02:4</id>
    <published>2006-09-02T00:13:00Z</published>
    <updated>2006-10-17T00:13:02Z</updated>
    <category term="Rails"/>
    <link href="http://fluctisonous.com/2006/9/2/default-attributes-from-fixtures" rel="alternate" type="text/html"/>
    <title>Default attributes from fixtures</title>
<summary type="html">&lt;p&gt;When testing a model that has a lot of attributes I keep a default fixture and populate a hash from it, probably not much less effort than creating the hash inline, I just like to keep the code clear of extra fluff.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;When testing a model that has a lot of attributes I keep a default fixture and populate a hash from it, probably not much less effort than creating the hash inline, I just like to keep the code clear of extra fluff.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;def load_default_attributes(model_name, options ={})
  fixture = options[:fixture] || :default
  attributes = temp_attributes = model = {}
  instance_eval &amp;lt;&amp;lt;-FIN
    temp_attributes = #{model_name.to_s.pluralize}(&quot;#{fixture}&quot;)
    model = #{model_name.to_s.capitalize}
  FIN
    drop = [options[:drop], :created_on, :updated_on, :id].flatten
    temp_attributes.attributes.each do |k, v| 
      attributes[k.to_sym] = v unless drop.include? k.to_sym
    end  
    options[:attributes].each {|k, v| attributes[k.to_sym] = v} if options[:attributes]
    if options[:confirmation] 
      options[:confirmation].each do |a| 
        attributes = attributes.merge( {&quot;#{a}_confirmation&quot;.to_sym =&amp;gt; attributes[a.to_sym]} )
      end 
    end
    return attributes
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The options;&lt;/p&gt;

&lt;p&gt;&lt;ul&gt;
&lt;li&gt;:fixture =&gt; &quot;foo&quot; use the fixture &quot;foo&quot; for the default values assuming the  fixtures filename is the plural of  &lt;em&gt;model_name&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;:attributes is a hash of attributes that override those retrieved from the fixture.&lt;/li&gt;
&lt;li&gt;:drop is an array of the attributes you do not want loaded into the hash from the fixture.&lt;/li&gt;
&lt;li&gt;:confirmation is an array attributes names to create a confirmation for e.g. :confirmation =&gt; [:password] will add to the returned hash a key   :password_confirmation with the same value as :password.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://fluctisonous.com/">
    <author>
      <name>admin</name>
    </author>
    <id>tag:fluctisonous.com,2006-08-28:2</id>
    <published>2006-08-28T21:07:00Z</published>
    <updated>2006-10-17T00:12:29Z</updated>
    <category term="Rails"/>
    <category term="What's happening"/>
    <link href="http://fluctisonous.com/2006/8/28/railsconf-europe-2006" rel="alternate" type="text/html"/>
    <title>RailsConf Europe</title>
<content type="html">
            &lt;p&gt;&lt;a href='http://europe.railsconf.org/'&gt;RailsConf Europe&lt;/a&gt; is shaping up to be both a fun and informative event. For a while there seemed to be a lack of will to sign up, in large part due to the high ticket price. But a post by &lt;a href='http://pinds.com/articles/2006/08/01/railsconf-europe-whos-going'&gt;Lars Pind&lt;/a&gt; has kick started a whole load of talk.&lt;/p&gt;
&lt;p&gt;There is a fantastic line-up of speakers, I am particularly looking forward to &lt;a href='http://www.rubypowerandlight.com/'&gt;David A Black&lt;/a&gt; after reading his excellent &lt;a href='http://www.manning.com/black'&gt;Ruby for Rails book&lt;/a&gt; which is the natural follow on from &lt;a href='http://pragmaticprogrammer.com/titles/rails2/index.html'&gt;Agile.&lt;/a&gt; The seminal rails book is well represented with authors &lt;a href='http://blogs.pragprog.com/cgi-bin/pragdave.cgi'&gt;Dave Thomas&lt;/a&gt;, &lt;a href='http://mir.aculo.us'&gt;Thomas Fuchs&lt;/a&gt; and of course &lt;a href='http://www.loudthinking.com'&gt;David Heinemeier Hansson&lt;/a&gt; all making appearances. From the reports of DHH's performance at RailsConf in Chicago there should be some interesting discussion of Restful and CRUDdy rails 1.2.&lt;/p&gt;
&lt;p&gt;If the quality of the speaker line-up isn't enough there will be some fun the evening before the main event with &lt;a href='http://pizzaonrails.com/'&gt;Pizza on Rails&lt;/a&gt; hosting a large gathering of rails enthusiasts for pizza and drinks kindly sponsored by &lt;a href='http://cominded.com/'&gt;Cominded.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hopefully see you there.&lt;/p&gt;
          </content>  </entry>
</feed>
