<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>Simon Menke</title>
 <link href="http://simonmenke.me/atom.xml" rel="self"/>
 <link href="http://simonmenke.me/"/>
 <updated>2010-02-13T07:38:08-08:00</updated>
 <id>http://simonmenke.me/</id>
 <author>
   <name>Simon Menke</name>
   <email>simon.menke@gmail.com</email>
 </author>
 
 
  
 <entry>
   <title>Milkshakes for everyone</title>
   <link href="http://simonmenke.me/2009/09/30/milkshakes-for-everyone.html"/>
   <updated>2009-09-30T00:00:00-07:00</updated>
   <id>http://simonmenke.me/2009/09/30/milkshakes-for-everyone</id>
   <content type="html">&lt;hr /&gt;
&lt;h3 style=&quot;vertical-align:middle;&quot;&gt;I&amp;#8217;m tired of Custom &lt;span class=&quot;caps&quot;&gt;CMS&lt;/span&gt; systems!&lt;/h3&gt;
&lt;p&gt;In the past few years I&amp;#8217;ve build dozens of custom &lt;span class=&quot;caps&quot;&gt;CMS&lt;/span&gt; systems. Nearly all of them were written in Rails. And now they are more of a problem than a solution. They all do things in a slightly different way. and there is a lot of duplication across these applications. Not because of the lack of plugins but because all these plugins require you to write or even generate code yourself. The reason why most plugins are written this way is obvious but I still need to do too much.&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style=&quot;vertical-align:middle;&quot;&gt;I hate prefab &lt;span class=&quot;caps&quot;&gt;CMS&lt;/span&gt; systems!&lt;/h3&gt;
&lt;p&gt;I&amp;#8217;ve looked at many prefab &lt;span class=&quot;caps&quot;&gt;CMS&lt;/span&gt; systems, trying to find a simple solution that would do all the things I needed to do and more importantly all the things &lt;a href=&quot;http://www.mrhenry.be&quot;&gt;our&lt;/a&gt; clients needed to do. Another problem with prefab &lt;span class=&quot;caps&quot;&gt;CMS&lt;/span&gt; systems is customizability. Some systems like &lt;a href=&quot;http://radiantcms.org&quot;&gt;Radiant&lt;/a&gt; are fairly customizable but simply too hard for our clients. Others, like &lt;a href=&quot;http://www.browsercms.org&quot;&gt;Browse &lt;span class=&quot;caps&quot;&gt;CMS&lt;/span&gt;&lt;/a&gt;, look nice but fail when compared to our wish list.&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style=&quot;vertical-align:middle;&quot;&gt;What I needed.&lt;/h3&gt;
&lt;p&gt;I wanted a system that was extremely modular, highly customizable and very client friendly. Unfortunately I didn&amp;#8217;t find it so I build it myself. Currently most of it is still under wraps but most of the modules/gems/plugins (whatever you would like to call them) will be released under one or an other &lt;span class=&quot;caps&quot;&gt;OSS&lt;/span&gt; license. Starting with the core today.&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style=&quot;vertical-align:middle;&quot;&gt;What I made.&lt;/h3&gt;
&lt;p&gt;The core is called Milkshake and it builds composite Rails applications.&lt;br /&gt;
Composite Rails applications are Rails applications that are build using many smaller Rails applications which in there turn can be build using many even smaller Rails applications.&lt;/p&gt;
&lt;figure&gt;&lt;img src=&quot;/images/2009-09-30/Diagram.png&quot; width=&quot;100%&quot; /&gt;&lt;legend&gt;A composite Rails application.&lt;br/&gt;Each node represents a fully functional rails application (except for Paperclip, Globalize, MetaController and MetaERB)&lt;/legend&gt;&lt;/figure&gt;
&lt;p&gt;Essentially Milkshake automatically loads gem-plugins, manages migrations and links static assets. This allows any regular gem plugin to become as privileged as any standard Rails application. Milkshake also allows you to take any regular Rails application and build a gem from it.&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style=&quot;vertical-align:middle;&quot;&gt;A list of what Milkshake does.&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;Automatically configure/load dependencies defined in &lt;code&gt;config/milkshake.yml&lt;/code&gt;.&lt;/li&gt;
	&lt;li&gt;Automatically migrate the database on relink.&lt;/li&gt;
	&lt;li&gt;Make database snapshots before migrating.&lt;/li&gt;
	&lt;li&gt;Load locale files from gems in rails &amp;gt; 2.3.4.&lt;/li&gt;
	&lt;li&gt;Initializers for gems like &lt;code&gt;config/initializers&lt;/code&gt; but in &lt;code&gt;rails/initializers&lt;/code&gt;.&lt;/li&gt;
	&lt;li&gt;Symlink public directory from gems into &lt;code&gt;public/vendor/[GEM_NAME]&lt;/code&gt;.&lt;/li&gt;
	&lt;li&gt;Extract data and configuration directories and files from the rails directory.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h3 style=&quot;vertical-align:middle;&quot;&gt;Installing Milkshake.&lt;/h3&gt;
&lt;p&gt;Installing Milkshake is easy but make sure you installed &lt;a href=&quot;gemcutter&quot;&gt;gemcutter&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;# only if you don&amp;#39;t already have gemcutter installed.&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;sudo gem install gemcutter
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;sudo gem tumble
&lt;span class=&quot;c&quot;&gt;# now install milkshake&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;sudo gem install milkshake
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;hr /&gt;
&lt;h3 style=&quot;vertical-align:middle;&quot;&gt;Building a gem with Milkshake.&lt;/h3&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;# generate an empty gem app&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;milkshake create.gem my_gem
&lt;span class=&quot;c&quot;&gt;# answer the questions&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;my_gem
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;ls
README    app     db    lib   public  script  tmp
Rakefile  config  doc   log   rails   &lt;span class=&quot;nb&quot;&gt;test    &lt;/span&gt;vendor
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Now you have a regular rails application with some extra files and directories needed for packaging everything up in a gem.&lt;/p&gt;
&lt;dl&gt;
  &lt;dt&gt;&lt;code&gt;rails/init.rb&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;This is the regular Rails gem plugin init file.&lt;/dd&gt;
  &lt;dt&gt;&lt;code&gt;rails/initializers&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;In here you can put initializers like in the &lt;code&gt;config/initializers&lt;/code&gt; directory. Note that the &lt;code&gt;config/initializers&lt;/code&gt; directory doesn&amp;#8217;t get packaged.&lt;/dd&gt;
  &lt;dt&gt;&lt;code&gt;config/milkshake.yml&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;In this file you define your gem dependencies. This replaces the &lt;code&gt;config.gem&lt;/code&gt; directive in the &lt;code&gt;config/environment.rb&lt;/code&gt; file.&lt;/dd&gt;
  &lt;dt&gt;&lt;code&gt;config/preinitializer.rb&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;This file loads the milkshake code and extends Rails.&lt;/dd&gt;
  &lt;dt&gt;&lt;code&gt;lib/tasks/jeweler.rake&lt;/code&gt;&lt;/dt&gt;
  &lt;dd&gt;This rake file contains the &lt;a href=&quot;http://github.com/technicalpickles/jeweler&quot;&gt;Jeweler&lt;/a&gt; tasks for packaging the Rails app.&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;If you look a little deeper you&amp;#8217;ll notice that the &lt;code&gt;application_controller.rb&lt;/code&gt; and the &lt;code&gt;application_helper.rb&lt;/code&gt; are missing. Generally you only add these to the top level gem but you don&amp;#8217;t have to as Milkshake has a fallback &lt;code&gt;application_controller.rb&lt;/code&gt; which get loaded if you don&amp;#8217;t include your own.&lt;/p&gt;
&lt;p&gt;After writing some code, adding some migrations and some static assets you can build this rails app like so:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;rake version:write &lt;span class=&quot;c&quot;&gt;# only the first time&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;rake gemspec build
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;A new directory called &lt;code&gt;pkg&lt;/code&gt; gets created, it contains the build gems. To install you new gem just do a &lt;code&gt;gem install [pathtogem]&lt;/code&gt; or:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;rake install
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;hr /&gt;
&lt;h3 style=&quot;vertical-align:middle;&quot;&gt;Using a Milkshake gem.&lt;/h3&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;# generate an empty host app&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;milkshake create.host my_host
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;my_host
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;ls
config  db  log public  script  tmp
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;As you can see a host app is mush slimmer than a gem app. The reason for this is that you don&amp;#8217;t use host apps for development and they should not contain code. They are just used for serving your composite app. Edit the &lt;code&gt;config/milkshake.yml&lt;/code&gt; file.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;yaml&quot;&gt;&lt;span class=&quot;l-Scalar-Plain&quot;&gt;gems&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;l-Scalar-Plain&quot;&gt;my_gem&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p-Indicator&quot;&gt;{}&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# no special lib, no specific version requirement, no specific source&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Next touch the &lt;code&gt;tmp/relink.txt&lt;/code&gt; file to make sure Milkshake links all the gems into the host app. Note that you need to restart the host app in order to actually run linker. Also note that (re-)linking the host app automatically runs all the migrations.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;touch tmp/relink.txt
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;touch tmp/restart.txt &lt;span class=&quot;c&quot;&gt;# restart the web server (in this case passenger)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;hr /&gt;
&lt;h3 style=&quot;vertical-align:middle;&quot;&gt;The way Milkshake alters the Rails initializer.&lt;/h3&gt;
&lt;p&gt;Milkshake adds some phases to the Rails initialization process. Below you can see all the added phases compared to a regular Rails initialization process.&lt;/p&gt;
&lt;table&gt;
	&lt;tr&gt;
		&lt;th&gt;Rails                         &lt;/th&gt;
		&lt;th&gt;Rails with Milkshake              &lt;/th&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; require frameworks              &lt;/td&gt;
		&lt;td&gt; require frameworks                  &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &amp;#8211;                               &lt;/td&gt;
		&lt;td&gt; &lt;ins&gt;extend frameworks with milkshake&lt;/ins&gt;  &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; load environment                &lt;/td&gt;
		&lt;td&gt; load environment                    &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; initialize database             &lt;/td&gt;
		&lt;td&gt; initialize database                 &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &amp;#8211;                               &lt;/td&gt;
		&lt;td&gt; &lt;ins&gt;take database snapshot&lt;/ins&gt;            &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &amp;#8211;                               &lt;/td&gt;
		&lt;td&gt; &lt;ins&gt;migrate database&lt;/ins&gt;                  &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; load gems                       &lt;/td&gt;
		&lt;td&gt; load gems                           &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; load plugins                    &lt;/td&gt;
		&lt;td&gt; load plugins                        &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; &amp;#8211;                               &lt;/td&gt;
		&lt;td&gt; &lt;ins&gt;load gem initializers&lt;/ins&gt;             &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt; load application initializers   &lt;/td&gt;
		&lt;td&gt; load application initializers       &lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;



</content>
 </entry>
  
 
  
 <entry>
   <title>Database agnostic Snapshots</title>
   <link href="http://simonmenke.me/2009/09/28/database-agnostic-snapshots.html"/>
   <updated>2009-09-28T00:00:00-07:00</updated>
   <id>http://simonmenke.me/2009/09/28/database-agnostic-snapshots</id>
   <content type="html">&lt;hr /&gt;
&lt;h3 style=&quot;vertical-align:middle;&quot;&gt;Why and how I use production data in our development environment.&lt;/h3&gt;
&lt;p&gt;At &lt;a href=&quot;http://www.mrhenry.be&quot;&gt;Mr. Henry&lt;/a&gt; we like to use real production data in our development environment. It allows us to see how our clients use our applications and how we can improve on that. We also like Sqlite3 in development and MySQL in production.&lt;/p&gt;
&lt;p&gt;The problem I faced when making an &lt;span class=&quot;caps&quot;&gt;SQL&lt;/span&gt; dump is the way Rails treats each type of database. For instance in Mysql booleans are represented as &lt;code&gt;0&lt;/code&gt; and  &lt;code&gt;1&lt;/code&gt; but in Sqlite3 &lt;code&gt;f&lt;/code&gt; and &lt;code&gt;t&lt;/code&gt; are used. This is where &lt;a href=&quot;http://www.github.com/fd/snapshots&quot;&gt;Snapshots&lt;/a&gt; comes in. Snapshots allows us to dump a database&amp;#8217;s schema and its data in a Ruby file. This file looks similar to the &lt;code&gt;db/schema.rb&lt;/code&gt; file, in fact the first section is identical. The second section is the most interesting though, it contains the actual data.&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s an example of what such a file might look like.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# This file was generated by the Snapshots::DatabaseDumper and&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# can be loaded with the Snapshots::DatabaseLoader.&lt;/span&gt;

&lt;span class=&quot;no&quot;&gt;ActiveRecord&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Schema&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;define&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;create_table&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;schema_migrations&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:id&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:force&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;string&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;version&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:null&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;false&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;add_index&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;schema_migrations&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;version&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;unique_schema_migrations&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:unique&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;create_table&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;posts&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:force&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;string&lt;/span&gt;   &lt;span class=&quot;s2&quot;&gt;&amp;quot;title&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;text&lt;/span&gt;     &lt;span class=&quot;s2&quot;&gt;&amp;quot;content&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;boolean&lt;/span&gt;  &lt;span class=&quot;s2&quot;&gt;&amp;quot;published&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;datetime&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;created_at&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;datetime&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;updated_at&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;no&quot;&gt;Snapshots&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;DatabaseLoader&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;load&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;for_table&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;posts&amp;quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;insert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
      &lt;span class=&quot;ss&quot;&gt;:id&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;ss&quot;&gt;:title&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Hello World&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;ss&quot;&gt;:content&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;My body text...&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;ss&quot;&gt;:published&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;ss&quot;&gt;:created_at&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Wed, 28 Sep 2009 09:24:04 +0000&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;ss&quot;&gt;:updated_at&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Wed, 28 Sep 2009 09:24:04 +0000&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_time&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;insert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
      &lt;span class=&quot;ss&quot;&gt;:id&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;ss&quot;&gt;:title&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Database Agnostic Snapshots&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;ss&quot;&gt;:content&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;You are reading it...&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;ss&quot;&gt;:published&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;ss&quot;&gt;:created_at&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Wed, 28 Sep 2009 09:24:26 +0000&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_time&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;ss&quot;&gt;:updated_at&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Wed, 28 Sep 2009 09:24:26 +0000&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_time&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;for_table&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;schema_migrations&amp;quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;insert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
      &lt;span class=&quot;ss&quot;&gt;:version&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;20090928091802&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;As you can see this file contains just Ruby. One strange thing you might notice is the &lt;code&gt;schema_migrations&lt;/code&gt; table. It is included in order to preserve the migration state.&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style=&quot;vertical-align:middle;&quot;&gt;How to install and use Snapshots.&lt;/h3&gt;
&lt;p&gt;Installing Snapshots is easy but make sure you installed &lt;a href=&quot;http://www.gemcutter.org&quot;&gt;gemcutter&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;# only if you don&amp;#39;t already have gemcutter installed.&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;sudo gem install gemcutter
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;sudo gem tumble
&lt;span class=&quot;c&quot;&gt;# now install snapshots&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;sudo gem install snapshots
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;p&gt;Next go to one of you rails apps and make start making snapshots.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;# dump a new snapshot&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;snapshots dump
&lt;span class=&quot;c&quot;&gt;# list all you snapshots.&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;snapshots list
1253528651 @ Wed Sep 28 09:28:11 +0200 2009 : db/snapshots/snapshot_1253528651.rb
&lt;span class=&quot;c&quot;&gt;# load a particular snapshot using the snapshot id.&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;snapshots load 1253528651
&lt;span class=&quot;c&quot;&gt;# or using a filename (not a snapshot doesn&amp;#39;t need to be in the db/snapshots directory).&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;snapshots load db/snapshots/snapshot_1253528651.rb
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;hr /&gt;
&lt;h3 style=&quot;vertical-align:middle;&quot;&gt;How to use Snapshots from within Ruby/Rails.&lt;/h3&gt;
&lt;p&gt;Snapshots also has simple ruby &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt; which can easily be used from within your rails application.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;snapshots&amp;#39;&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# find all snapshots.&lt;/span&gt;
&lt;span class=&quot;no&quot;&gt;Snapshots&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;each&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;p&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# dump a new snapshot&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Snapshots&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dump&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# load a snapshot&lt;/span&gt;
&lt;span class=&quot;no&quot;&gt;Snapshots&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;version_or_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;hr /&gt;
&lt;h3 style=&quot;vertical-align:middle;&quot;&gt;Note on Patches/Pull Requests.&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;Fork the project.&lt;/li&gt;
	&lt;li&gt;Make your feature addition or bug fix.&lt;/li&gt;
	&lt;li&gt;Add tests for it. This is important so I don&amp;#8217;t break it in a future version unintentionally.&lt;/li&gt;
	&lt;li&gt;Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)&lt;/li&gt;
	&lt;li&gt;Send me a pull request. Bonus points for topic branches.&lt;/li&gt;
	&lt;li&gt;Yes, I know this is the Jeweler scaffold :)&lt;/li&gt;
&lt;/ul&gt;


</content>
 </entry>
  
 
  
 <entry>
   <title>Navigate between tabs like in TextMate</title>
   <link href="http://simonmenke.me/2009/04/26/navigate-between-tabs-like-in-textmate.html"/>
   <updated>2009-04-26T00:00:00-07:00</updated>
   <id>http://simonmenke.me/2009/04/26/navigate-between-tabs-like-in-textmate</id>
   <content type="html">&lt;p&gt;I like the way TextMate lets me navigate all my open tabs using &amp;#8984;&amp;larr; and &amp;#8984;&amp;rarr;. So here is a small tutorial on setting this up on your computer.&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style=&quot;vertical-align:middle;&quot;&gt;Click the add button&lt;/h3&gt;
&lt;p style=&quot;text-align:center;&quot;&gt;&lt;img src=&quot;/images/2009-04-26/Click-add.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style=&quot;vertical-align:middle;&quot;&gt;On tab to the right&lt;/h3&gt;
&lt;p style=&quot;text-align:center;&quot;&gt;&lt;img src=&quot;/images/2009-04-26/Enter-the-menu-name-and-the-shortcut.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style=&quot;vertical-align:middle;&quot;&gt;Don&amp;#8217;t forget the other shortcut.&lt;/h3&gt;
&lt;p style=&quot;text-align:center;&quot;&gt;&lt;img src=&quot;/images/2009-04-26/The-result.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;</content>
 </entry>
  
 
  
 <entry>
   <title>Introducing GM [OUTDATED]</title>
   <link href="http://simonmenke.me/2009/01/18/introducing-gm.html"/>
   <updated>2009-01-18T00:00:00-08:00</updated>
   <id>http://simonmenke.me/2009/01/18/introducing-gm</id>
   <content type="html">&lt;hr /&gt;
&lt;h3 style=&quot;vertical-align:middle;&quot;&gt;Introduction / Motivation&lt;/h3&gt;
&lt;p&gt;The problem with the existing tools for building gems, like &lt;a href=&quot;http://seattlerb.rubyforge.org/hoe/&quot;&gt;hoe&lt;/a&gt; and &lt;a href=&quot;http://newgem.rubyforge.org/&quot;&gt;newgem&lt;/a&gt;, is they generate a whole host of files which are hard to maintain. Tools like &lt;a href=&quot;http://dojo.rubyforge.org/gemify/&quot;&gt;gemify&lt;/a&gt; and &lt;a href=&quot;http://github.com/dcrec1/gemhub/tree/master&quot;&gt;gemhub&lt;/a&gt; on the other hand are to simplified and work only for very small gems which follow the imposed conventions.&lt;/p&gt;
&lt;p&gt;The solution would be to make a tool which doesn&amp;#8217;t  generate unneeded files and uses a simple configuration format like &lt;span class=&quot;caps&quot;&gt;YAML&lt;/span&gt;. Enter &lt;a href=&quot;http://simonmenke.me/gm&quot;&gt;GM&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://simonmenke.me/gm&quot;&gt;GM&lt;/a&gt; is a framework for building gems in a clean and simple way. It uses &lt;span class=&quot;caps&quot;&gt;YAML&lt;/span&gt; as its configuration format and generates only the absolute minimum needed to get you going. &lt;a href=&quot;http://simonmenke.me/gm&quot;&gt;GM&lt;/a&gt; is also designed to be extendable in (almost) every way.&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 style=&quot;vertical-align:middle;&quot;&gt;How to use GM&lt;/h3&gt;
&lt;h4&gt;Install GM&lt;/h4&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;sudo gem install simonmenke-gm
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;h4&gt;Global configuration&lt;/h4&gt;
&lt;p&gt;Put the following snippet in &lt;code&gt;~/.gmrc&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;yaml&quot;&gt;&lt;span class=&quot;l-Scalar-Plain&quot;&gt;author&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;l-Scalar-Plain&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt;  &lt;span class=&quot;p-Indicator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;Your Name Here&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;l-Scalar-Plain&quot;&gt;email&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p-Indicator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;Your Email Here&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;l-Scalar-Plain&quot;&gt;github&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;l-Scalar-Plain&quot;&gt;username&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p-Indicator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;Your GitHub Username Here&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;h4&gt;Create a gem&lt;/h4&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;gm create name_of_your_gem
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;h4&gt;Gem configuration&lt;/h4&gt;
&lt;p&gt;Put the following snippet in the &lt;code&gt;Gmfile&lt;/code&gt; of your gem.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;yaml&quot;&gt;&lt;span class=&quot;l-Scalar-Plain&quot;&gt;general&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;l-Scalar-Plain&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt;     &lt;span class=&quot;p-Indicator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;The Gem Name&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;l-Scalar-Plain&quot;&gt;version&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt;  &lt;span class=&quot;p-Indicator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;The Gem Version&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;l-Scalar-Plain&quot;&gt;summary&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt;  &lt;span class=&quot;p-Indicator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;A Summary&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;l-Scalar-Plain&quot;&gt;homepage&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p-Indicator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;The Homepage Of The Gem&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;l-Scalar-Plain&quot;&gt;dependencies&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;p-Indicator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;p-Indicator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;Name Of Gem&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;]&lt;/span&gt;  &lt;span class=&quot;p-Indicator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;Version Requirement (&amp;gt;= 1.0.0)&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;h4&gt;Write code&lt;/h4&gt;
&lt;p&gt;I can&amp;#8217;t help you here ;)&lt;/p&gt;
&lt;h4&gt;Build or install your gem&lt;/h4&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;gm build
gm install
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;h4&gt;Dump a .gemspec file for GitHub&lt;/h4&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;gm spec
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;hr /&gt;
&lt;h3 style=&quot;vertical-align:middle;&quot;&gt;Known problems with GM&lt;/h3&gt;
&lt;ol&gt;
	&lt;li&gt;The &lt;code&gt;gm&lt;/code&gt; command may conflict with the &lt;code&gt;gm&lt;/code&gt; tool from GraphicsMagick. To bypass this use &lt;code&gt;gem-make&lt;/code&gt; instead of &lt;code&gt;gm&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Please post any bug reports or feature requests &lt;a href=&quot;http://menke.lighthouseapp.com/projects/23688-gm&quot; title=&quot;lighthouse&quot;&gt;here&lt;/a&gt;&lt;/p&gt;




</content>
 </entry>
  
 
 
</feed>
