<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>LarryOnLine - Home</title>
  <id>tag:larry.baltz.org,2009:mephisto/</id>
  <generator version="0.8.0" uri="http://mephistoblog.com">Mephisto Drax</generator>
  <link href="http://larry.baltz.org/feed/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://larry.baltz.org/" rel="alternate" type="text/html"/>
  <updated>2008-10-17T10:40:29Z</updated>
  <entry xml:base="http://larry.baltz.org/">
    <author>
      <name>larry</name>
    </author>
    <id>tag:larry.baltz.org,2008-10-17:10</id>
    <published>2008-10-17T08:40:00Z</published>
    <updated>2008-10-17T10:40:29Z</updated>
    <category term="tech"/>
    <category term="html-template"/>
    <category term="markaby"/>
    <category term="ruby"/>
    <category term="rubyonrails"/>
    <category term="view"/>
    <link href="http://larry.baltz.org/2008/10/17/markaby-and-rails-2-1-x-woes" rel="alternate" type="text/html"/>
    <title>Markaby and Rails &#8212; 2.1.x woes</title>
<content type="html">
            &lt;p&gt;I really like &lt;a href=&quot;http://code.whytheluckystiff.net/markaby/&quot;&gt;Markaby&lt;/a&gt; for HTML templates.  I think it&#8217;s especially good if Ruby programmers are creating and updating the views.  If you have to get a designer involved (i.e. non Rubyist) maybe &lt;a href=&quot;http://www.ruby-doc.org/stdlib/libdoc/erb/rdoc/classes/ERB.html&quot;&gt;ERB&lt;/a&gt; or &lt;a href=&quot;http://haml.hamptoncatlin.com/&quot;&gt;Haml&lt;/a&gt; would be better, but, otherwise it&#8217;s great, because everything is Ruby.&lt;/p&gt;

&lt;p&gt;So, I started out trying to get Markaby working with Rails 2.1.0.  With some hours of confusion as to why it didn&#8217;t work and digging into Rails and Markaby code, I came up with the following two hacks which patch up Markaby to work with changes in the Rails rendering code.&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;vendor/plugins/markaby/init.rb&lt;/code&gt;, change&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ActionView::Base::register_template_handler 'mab',  Markaby::Rails::ActionViewTemplateHandler
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;to &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ActionView::Template::register_template_handler 'mab',  Markaby::Rails::ActionViewTemplateHandler
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Create &lt;code&gt;config/initializers/markaby_fixup.rb&lt;/code&gt;:&lt;/p&gt;

&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;14&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;15&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;16&lt;tt&gt;
&lt;/tt&gt;17&lt;tt&gt;
&lt;/tt&gt;18&lt;tt&gt;
&lt;/tt&gt;19&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c&quot;&gt;# see http://onemanswalk.com/work/2007/12/13/using-markaby-w-rails-2-0-1/&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;co&quot;&gt;ActionView&lt;/span&gt;::&lt;span class=&quot;co&quot;&gt;Base&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cl&quot;&gt;ActionView::Base&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;string_path&lt;/span&gt;(string)&lt;tt&gt;
&lt;/tt&gt;    string&lt;tt&gt;
&lt;/tt&gt;  &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;co&quot;&gt;Markaby&lt;/span&gt;::&lt;span class=&quot;co&quot;&gt;Rails&lt;/span&gt;::&lt;span class=&quot;co&quot;&gt;ActionViewTemplateHandler&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cl&quot;&gt;Markaby::Rails::ActionViewTemplateHandler&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;compilable?&lt;/span&gt;; &lt;span class=&quot;pc&quot;&gt;false&lt;/span&gt;; &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class=&quot;r&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;render&lt;/span&gt;(template)&lt;tt&gt;
&lt;/tt&gt;    assigns = &lt;span class=&quot;iv&quot;&gt;@action_view&lt;/span&gt;.instance_vars.to_h.merge(template.locals)&lt;tt&gt;
&lt;/tt&gt;    builder = &lt;span class=&quot;co&quot;&gt;Markaby&lt;/span&gt;::&lt;span class=&quot;co&quot;&gt;Rails&lt;/span&gt;::&lt;span class=&quot;co&quot;&gt;Builder&lt;/span&gt;.new(assigns, &lt;span class=&quot;iv&quot;&gt;@action_view&lt;/span&gt;)&lt;tt&gt;
&lt;/tt&gt;    eval_args = [template.source, template.filename].compact&lt;tt&gt;
&lt;/tt&gt;    builder.capture { instance_eval(*eval_args) }&lt;tt&gt;
&lt;/tt&gt;  &lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class=&quot;r&quot;&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;So this was working fine until I updated to Rails 2.1.1, at which time I got several errors like the following:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;undefined method `/people/1320/edit_path' for #&amp;lt;ActionView::Base:0x3d0a090&amp;gt;
On line #26 of people/show.html.mab

    23:   text h(@person.maiden_name)
    24: end
    25: 
    26: link_to 'Edit', edit_person_path(@person)
    27: link_to 'Back', people_path

    vendor/plugins/markaby/lib/markaby/builder.rb:166:in `send'
    config/initializers/markaby_fixup.rb:26:in `method_missing'
    app/views/addresses/new.html.mab:30:in `render'
    vendor/plugins/markaby/lib/markaby/builder.rb:105:in `instance_eval'
    vendor/plugins/markaby/lib/markaby/builder.rb:105:in `capture'
    config/initializers/markaby_fixup.rb:17:in `render'
    spec/views/addresses/new.html.mab_spec.rb:18
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I&#8217;ll keep digging to figure out how to fix my fix so I can continue to use Markaby, but really what I&#8217;m wondering is — am I the only one trying to us Markaby with recent versions of Rails?  I found &lt;a href=&quot;http://code.whytheluckystiff.net/markaby/ticket/58&quot;&gt;a relevant bug report&lt;/a&gt; or two, but no apparent action to fix them.  I&#8217;m a little worried about the health of Markaby in relation to Rails.&lt;/p&gt;

&lt;p&gt;Anyway, I&#8217;ll keep plugging and report back here if I work out anything.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://larry.baltz.org/">
    <author>
      <name>larry</name>
    </author>
    <id>tag:larry.baltz.org,2008-10-14:9</id>
    <published>2008-10-14T20:45:00Z</published>
    <updated>2008-10-14T20:45:31Z</updated>
    <category term="tech"/>
    <category term="markdown"/>
    <category term="mephisto"/>
    <category term="typo"/>
    <link href="http://larry.baltz.org/2008/10/14/old-blog-entries" rel="alternate" type="text/html"/>
    <title>Old blog entries</title>
<content type="html">
            &lt;p&gt;I&#8217;ve ported my old blog entries to the new blog and filed them under &#8216;archive&#8217;.  Hopefully moving them around won&#8217;t have confused anybody.&lt;/p&gt;

&lt;p&gt;If you&#8217;re wondering, I didn&#8217;t use the Mephisto supplied Typo-&gt;Mephisto conversion script (&lt;a href=&quot;http://blog.codefront.net/2006/09/01/from-typo-to-mephisto/&quot;&gt;see article&lt;/a&gt;).  I just dumped the previous database, copied the &lt;a href=&quot;http://daringfireball.net/projects/markdown/&quot;&gt;Markdown&lt;/a&gt; text, pasted it into new articles and then back-dated them in Mephisto.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://larry.baltz.org/">
    <author>
      <name>larry</name>
    </author>
    <id>tag:larry.baltz.org,2008-10-11:1</id>
    <published>2008-10-11T12:23:00Z</published>
    <updated>2008-10-14T23:32:57Z</updated>
    <category term="tech"/>
    <category term="hosting"/>
    <category term="mephisto"/>
    <category term="ovh"/>
    <category term="rubyonrails"/>
    <category term="sqlite"/>
    <category term="technical"/>
    <link href="http://larry.baltz.org/2008/10/11/blog-bootstrap" rel="alternate" type="text/html"/>
    <title>blog bootstrap &#8212; mephisto on ovh</title>
<content type="html">
            &lt;p&gt;I thought, for the first entry on my new blog, I&#8217;d explain how I got it all up and running.  Partly so I will have a reference in the future and partly hoping other people might find it useful.&lt;/p&gt;

&lt;h2&gt;hosting &#8211; ovh&lt;/h2&gt;

&lt;p&gt;I chose to use a &lt;a href=&quot;http://www.ovh.com/fr/particulier/produits/offres_rps.xml&quot;&gt;dedicated server&lt;/a&gt; from &lt;a href=&quot;http://www.ovh.com/fr/particulier/index.xml?section=particulier&quot;&gt;ovh&lt;/a&gt; for hosting.  I wanted something independent that I had control over and with some reasonable performance.  Here&#8217;s the configuration I chose:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ovh config: rsp2&lt;/li&gt;
&lt;li&gt;os distro: linux ubuntu server 8.04.1&lt;/li&gt;
&lt;li&gt;processor: Intel  Atom Dual, 2x 1.6 GHz, L2: 2x 512Ko, FSB: 533MHz, Dual-Core&lt;/li&gt;
&lt;li&gt;RAM: 1GB&lt;/li&gt;
&lt;li&gt;storage: 10GB (network attached via. NFS)&lt;/li&gt;
&lt;li&gt;bandwidth: 100Mbps&lt;/li&gt;
&lt;li&gt;throughput limit: none&lt;/li&gt;
&lt;li&gt;1+1 IP addresses&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For me the only real compromise is the network storage instead of dedicated attached disks, but the price was really attractive (€15/month) so I thought I&#8217;d see how things go.  I&#8217;ve noticed that from the command line, disk operations can be kind of slow, but the main purpose of the machine is network services (web, (light) backup, admin, etc.), so I&#8217;m hoping that the remote storage won&#8217;t be a problem.&lt;/p&gt;

&lt;p&gt;I ordered the server on-line on the 7th and it was up and running yesterday (the 10th).  So, about a 4 day turn-around.  Everything was pretty easy except for one minor hitch &#8211; the login ID was wrong on the email they sent to let me know the server was ready.  It was &lt;code&gt;admin&lt;/code&gt; but should have been &lt;code&gt;root&lt;/code&gt;.  I guess the other thing that annoyed me slightly was how bear the distro was.  I ended up having to install quite a few packages to get a really basic set-up running, but I guess I can&#8217;t really disagree with the decision to keep the dristro lean, otherwise you&#8217;d potentially end up with a bunch of stuff you don&#8217;t need cluttering things up.&lt;/p&gt;

&lt;h2&gt;blog engine &#8211; mephisto&lt;/h2&gt;

&lt;p&gt;I do a lot of work with &lt;a href=&quot;http://www.rubyonrails.org/&quot;&gt;Ruby on Rails&lt;/a&gt; so I wanted to use, if possible, a blog engine based on Rails.  I&#8217;ve tried &lt;a href=&quot;http://typosphere.org/wiki/typo&quot;&gt;Typo&lt;/a&gt; (quite a while ago), and figured I&#8217;d play with the new kid on the block and see if he&#8217;s any more fun.&lt;/p&gt;

&lt;h3&gt;Rails deployment&lt;/h3&gt;

&lt;p&gt;First I had to set up some way to serve up Ruby on Rails.  I chose to use &lt;a href=&quot;http://www.modrails.com/&quot;&gt;Passenger&lt;/a&gt; (mod_rails) with Apache&#8217;s &lt;a href=&quot;http://httpd.apache.org/&quot;&gt;httpd server&lt;/a&gt;.  I&#8217;ll just create a big list of steps here to give you an idea what I had to do.  If you&#8217;ve got questions let me know:&lt;/p&gt;

&lt;h4&gt;apache&lt;/h4&gt;

&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;sudo apt-get install apache2&lt;tt&gt;
&lt;/tt&gt;sudo apt-get install apache2-threaded-dev&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;h4&gt;ruby&lt;/h4&gt;

&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;sudo apt-get ruby-full&lt;tt&gt;
&lt;/tt&gt;sudo apt-get ruby-pkg-tools&lt;tt&gt;
&lt;/tt&gt;# ruby gems -- I chose to install from source to allow ruby gems to update itself&lt;tt&gt;
&lt;/tt&gt;cd ~/src&lt;tt&gt;
&lt;/tt&gt;wget 'http://rubyforge.org/frs/?group_id=126'&lt;tt&gt;
&lt;/tt&gt;cd ~/src/rubygems-1.3.0`&lt;tt&gt;
&lt;/tt&gt;sudo ruby setup.rb # see http://www.rubygems.org/read/chapter/3&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;h4&gt;rails&lt;/h4&gt;

&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;sudo gem install rails`&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;h4&gt;passenger&lt;/h4&gt;

&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;sudo gem install passenger&lt;tt&gt;
&lt;/tt&gt;sudo passenger-install-apache2-module&lt;tt&gt;
&lt;/tt&gt;sudo vi /etc/apache2/mods-available/passenger.conf&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;blockquote&gt;
&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.0.3/ext/apache2/mod_passenger.so&lt;tt&gt;
&lt;/tt&gt;PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.0.3&lt;tt&gt;
&lt;/tt&gt;PassengerRuby /usr/bin/ruby1.8&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;/blockquote&gt;

&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;ln -s /etc/apache/mods-available/passenger.conf /etc/apache/mods-enabled&lt;tt&gt;
&lt;/tt&gt;sudo vi /etc/apache/sites-available/default&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;blockquote&gt;
&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;. . . &lt;tt&gt;
&lt;/tt&gt;DocumentRoot /var/www/mephisto/current/public/&lt;tt&gt;
&lt;/tt&gt;&amp;lt;Directory /var/www/mephisto/current/public/&amp;gt;&lt;tt&gt;
&lt;/tt&gt;            Options Indexes FollowSymLinks MultiViews&lt;tt&gt;
&lt;/tt&gt;            AllowOverride None&lt;tt&gt;
&lt;/tt&gt;            Order allow,deny&lt;tt&gt;
&lt;/tt&gt;            allow from all&lt;tt&gt;
&lt;/tt&gt;&amp;lt;/Directory&amp;gt;&lt;tt&gt;
&lt;/tt&gt;. . .&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;/blockquote&gt;

&lt;h3&gt;mephisto&lt;/h3&gt;

&lt;p&gt;Setting up mephisto was a little more work than I would have liked.  Two things made it complicated: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;the TZ environment variable needs to be set and that&#8217;s not strait forward for mod_rails.  There&#8217;s a &lt;a href=&quot;http://blog.rayapps.com/2008/05/21/using-mod_rails-with-rails-applications-on-oracle/&quot;&gt;hack&lt;/a&gt; that works, but it&#8217;s a bit messy.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;the stable version (at the time of writing this) for mephisto is 0.8 which requires rails version 2.0.2 (i.e. mephisto won&#8217;t work with newer versions), so I had to freeze mephisto to the 2.0.2 version of rails.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here&#8217;s detailed list of steps I took to get mephisto setup.&lt;/p&gt;

&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;sudo gem install tzinfo&lt;tt&gt;
&lt;/tt&gt;wget http://github.com/technoweenie/mephisto/tarball/master.tar.gz&lt;tt&gt;
&lt;/tt&gt;cd /var/www&lt;tt&gt;
&lt;/tt&gt;mkdir mephesto&lt;tt&gt;
&lt;/tt&gt;cd methisto&lt;tt&gt;
&lt;/tt&gt;tar xzf ~/src/technoweenie-mephisto-22dab17c881f9db136194243844d8ace37536099.tar.gz&lt;tt&gt;
&lt;/tt&gt;mv technoweenie-mephisto-22dab17c881f9db136194243844d8ace37536099 v0.8&lt;tt&gt;
&lt;/tt&gt;ln -s v0.8 current&lt;tt&gt;
&lt;/tt&gt;mkdir shared ; mkdir shared/log; mkdir shared/db&lt;tt&gt;
&lt;/tt&gt;cd current&lt;tt&gt;
&lt;/tt&gt;sudo su www-data -c 'rake rails:freeze:edge RELEASE=2.0.2'&lt;tt&gt;
&lt;/tt&gt;vi config/database.yml&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;blockquote&gt;
&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;production:&lt;tt&gt;
&lt;/tt&gt;  adapter: sqlite3&lt;tt&gt;
&lt;/tt&gt;  dbfile: /var/www/mephisto/shared/db/production.sqlite3&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;/blockquote&gt;

&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;13&lt;tt&gt;
&lt;/tt&gt;14&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;rm log; ln -s ../shared/log .&lt;tt&gt;
&lt;/tt&gt;rake db:bootstrap&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;h4&gt;&lt;a href=&quot;http://blog.rayapps.com/2008/05/21/using-mod_rails-with-rails-applications-on-oracle/&quot;&gt;hack&lt;/a&gt; to set &lt;code&gt;TZ&lt;/code&gt; environment variable that mephisto needs&lt;/h4&gt;

&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;sudo mkdir /etc/apache2/passenger&lt;tt&gt;
&lt;/tt&gt;sudo vi /etc/apache2/passenger/envronment&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;blockquote&gt;
&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;TZ=UTC&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;/blockquote&gt;

&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;sudo vi /etc/apache2/passenger/ruby_with_env&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;blockquote&gt;
&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;    #!/bin/bash`  &lt;tt&gt;
&lt;/tt&gt;. $(dirname $0)/environment`  &lt;tt&gt;
&lt;/tt&gt;/usr/bin/ruby $*&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;/blockquote&gt;

&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;sudo vi /etc/apache2/mods-available/passenger.conf&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;blockquote&gt;
&lt;table class=&quot;CodeRay&quot;&gt;&lt;tr&gt;
  &lt;td title=&quot;click to toggle&quot; class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class=&quot;code&quot;&gt;&lt;pre&gt;LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.0.3/ext/apache2/mod_passenger.so&lt;tt&gt;
&lt;/tt&gt;PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.0.3&lt;tt&gt;
&lt;/tt&gt;#PassengerRuby /usr/bin/ruby1.8&lt;tt&gt;
&lt;/tt&gt;PassengerRuby /etc/apache2/passenger/ruby_with_env&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;/blockquote&gt;
          </content>  </entry>
</feed>
