<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>ExpressionLab - Home</title>
  <id>tag:www.expressionlab.com,2008:mephisto/</id>
  <generator uri="http://mephistoblog.com" version="0.8.0">Mephisto Drax</generator>
  <link href="http://www.expressionlab.com/feed/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://www.expressionlab.com/" rel="alternate" type="text/html"/>
  <updated>2008-12-29T14:44:41Z</updated>
  <entry xml:base="http://www.expressionlab.com/">
    <author>
      <name>hatem</name>
    </author>
    <id>tag:www.expressionlab.com,2008-12-29:237</id>
    <published>2008-12-29T11:48:00Z</published>
    <updated>2008-12-29T14:44:41Z</updated>
    <category term="Thoughts"/>
    <category term="css"/>
    <category term="source code editor"/>
    <link href="http://www.expressionlab.com/2008/12/29/free-css-toolbox" rel="alternate" type="text/html"/>
    <title>Free CSS Toolbox</title>
<summary type="html">&lt;img class=&quot;excerpt_image&quot; title=&quot;CSS&quot; src=&quot;/assets/2008/12/29/css.png&quot; alt=&quot;CSS&quot; /&gt;Web developers always care about standards compliant coding and cross-browser compatibility. A great tool to help in that is &lt;a href=&quot;http://www.blumentals.net/csstool/&quot;&gt;Free CSS Toolbox&lt;/a&gt; from &lt;a href=&quot;http://www.blumentals.net/&quot;&gt;Blumentals&lt;/a&gt;.</summary><content type="html">
            &lt;img class=&quot;excerpt_image&quot; title=&quot;CSS&quot; src=&quot;/assets/2008/12/29/css.png&quot; alt=&quot;CSS&quot; /&gt;Web developers always care about standards compliant coding and cross-browser compatibility. A great tool to help in that is &lt;a href=&quot;http://www.blumentals.net/csstool/&quot;&gt;Free CSS Toolbox&lt;/a&gt; from &lt;a href=&quot;http://www.blumentals.net/&quot;&gt;Blumentals&lt;/a&gt;.
&lt;p&gt;&lt;img class=&quot;photo&quot; title=&quot;Free CSS Toolbox&quot; src=&quot;/assets/2008/12/29/free_css_toolbox-thumb.png&quot; alt=&quot;Free CSS Toolbox&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Free CSS Toolbox is a simple, lightweight editor that offers auto-complete and syntax highlighting for CSS code. Main features include:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Syntax checking against various specifications (CSS Level 1, CSS Level 2, CSS Level 2.1, CSS Mobile Profile 1.0)&lt;/li&gt;
	&lt;li&gt;Syntax checking against various browsers with useful warning/error messages (IE 5/5.5/6/7, Firefox 2.0, Netscape 7/8, Opera 7/8/9)&lt;/li&gt;
	&lt;li&gt;Code validation with W3C CSS Validator&lt;/li&gt;
	&lt;li&gt;Code re-formatting with many options&lt;/li&gt;
	&lt;li&gt;Code compression&lt;/li&gt;
	&lt;li&gt;Best of all, it's free&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;By the way, Blumentals offers a more advanced CSS editing tool, &lt;a href=&quot;http://www.blumentals.net/rapidcss/&quot;&gt;Rapid CSS Editor&lt;/a&gt;, which costs $29.85 for a personal license and $39.85 for a commercial one.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.expressionlab.com/">
    <author>
      <name>hatem</name>
    </author>
    <id>tag:www.expressionlab.com,2008-12-13:173</id>
    <published>2008-12-13T09:18:00Z</published>
    <updated>2008-12-29T08:31:27Z</updated>
    <category term="Thoughts"/>
    <category term="aptana"/>
    <category term="eclipse"/>
    <category term="instantrails"/>
    <category term="rails"/>
    <link href="http://www.expressionlab.com/2008/12/13/running-aptana-eclipse-and-instantrails-from-a-usb-drive" rel="alternate" type="text/html"/>
    <title>Running Aptana/Eclipse and InstantRails from a USB Drive</title>
<summary type="html">&lt;img class=&quot;excerpt_image&quot; title=&quot;Aptana&quot; src=&quot;/assets/2008/11/19/aptana.png&quot; alt=&quot;Aptana&quot; /&gt;If you are using &lt;a href=&quot;http://www.aptana.com/&quot;&gt;Aptana Studio&lt;/a&gt; for Ruby on Rails development, you may have to repeat several boring tasks to get them up and running on a different computer. First, you need to install Ruby, Rails and MySQL. Then, you need to download and install Java, Aptana Studio and Aptana RadRails plugin. Finally you need to configure Aptana for Rails development. In addition, you may need to install some Aptana plugins and Rails gems. If you don't want to go through all these steps, you can just put everything on a USB drive and go. Here is how.</summary><content type="html">
            &lt;img class=&quot;excerpt_image&quot; title=&quot;Aptana&quot; src=&quot;/assets/2008/11/19/aptana.png&quot; alt=&quot;Aptana&quot; /&gt;If you are using &lt;a href=&quot;http://www.aptana.com/&quot;&gt;Aptana Studio&lt;/a&gt; for Ruby on Rails development, you may have to repeat several boring tasks to get them up and running on a different computer. First, you need to install Ruby, Rails and MySQL. Then, you need to download and install Java, Aptana Studio and Aptana RadRails plugin. Finally you need to configure Aptana for Rails development. In addition, you may need to install some Aptana plugins and Rails gems. If you don't want to go through all these steps, you can just put everything on a USB drive and go. Here is how.
&lt;ol&gt;
  &lt;li&gt;Create a new folder on your USB drive and name it &lt;strong&gt;aptana-live&lt;/strong&gt;, or anything you want&lt;/li&gt;
  &lt;li&gt;Go to the Aptana Studio &lt;a href=&quot;http://www.aptana.com/studio/download&quot;&gt;download page&lt;/a&gt; and download the Windows standalone &lt;strong&gt;Zip File&lt;/strong&gt;, not the Full Installer. It may be called something like Aptana_Studio_Setup_Windows.zip&lt;/li&gt;
  &lt;li&gt;Unzip Aptana_Studio_Setup_Windows.zip to the &lt;strong&gt;/aptana-live&lt;/strong&gt; folder&lt;/li&gt;
  &lt;li&gt;Download and install &lt;a href=&quot;http://www.java.com/&quot;&gt;Java&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Copy the folder containing Java Runtime files to the folder &lt;strong&gt;/aptana-live/java-files&lt;/strong&gt;. For me, the Java folder was &lt;strong&gt;C:\Program Files\Java\jre1.6.0_07&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;For Aptana to know the Java location, edit the &lt;strong&gt;/aptana-live/AptanaStudio.ini&lt;/strong&gt; file by adding two lines at the top to be something like this:&lt;br /&gt;
  &lt;pre&gt;&lt;code&gt;&lt;strong&gt;-vm
.\java-files\jre1.6.0_07\bin\javaw&lt;/strong&gt;
-name
Aptana
Studio
-vmargs
-Xmx384M
-Xms128M
-Djava.awt.headless=true&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
  &lt;li&gt;To take Ruby, Rails and MySQL with you, just download and unzip &lt;a href=&quot;http://instantrails.rubyforge.org/wiki/wiki.pl&quot;&gt;InstantRails&lt;/a&gt; to the folder &lt;strong&gt;/aptana-live/InstantRails&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;Run Aptana by running &lt;strong&gt;/aptana-live/AptanaStudio.exe&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;To install Aptana RadRails plugin:
    &lt;ol&gt;
      &lt;li&gt;From Aptana &amp;quot;Help&amp;quot; menu, select &amp;quot;Software Updates&amp;quot; &amp;gt; &amp;quot;Find and Install...&amp;quot;&lt;/li&gt;
      &lt;li&gt;Choose &amp;quot;Search for new features to install&amp;quot; and press &amp;quot;Next&amp;quot;&lt;/li&gt;
      &lt;li&gt;Select &amp;quot;Aptana: RadRails Development Environment&amp;quot; and press &amp;quot;Finish&amp;quot;&lt;/li&gt;
      &lt;li&gt;Follow the wizard to the end&lt;/li&gt;
    &lt;/ol&gt;
  &lt;/li&gt;
  &lt;li&gt;To configure Aptana:
    &lt;ol&gt;
      &lt;li&gt;From Aptana &amp;quot;Window&amp;quot; menu, select &amp;quot;Preferences...&amp;quot;&lt;/li&gt;
      &lt;li&gt;In the the preferences window, select &amp;quot;Rails&amp;quot; &amp;gt; &amp;quot;Configuration&amp;quot; and fill the paths to rails and mongrel scripts: &lt;strong&gt;\InstantRails\ruby\bin\rails&lt;/strong&gt; and &lt;strong&gt;\InstantRails\ruby\bin\mongrel_rails&lt;/strong&gt;&lt;/li&gt;
      &lt;li&gt;In the the preferences window, select &amp;quot;Ruby&amp;quot; &amp;gt; &amp;quot;Installed Interpreters&amp;quot;. You may find JRuby selected by default. Press &amp;quot;Add&amp;quot; and fill the path to RubyVM home directory: &lt;strong&gt;\InstantRails\ruby&lt;/strong&gt;. Press &amp;quot;OK&amp;quot;&lt;/li&gt;
      &lt;li&gt;In the the preferences window, select &amp;quot;Ruby&amp;quot; &amp;gt; &amp;quot;Rake&amp;quot; and fill the path to the rake script: &lt;strong&gt;\InstantRails\ruby\bin\rake&lt;/strong&gt;&lt;/li&gt;
      &lt;li&gt;Press &amp;quot;OK&amp;quot;&lt;/li&gt;
    &lt;/ol&gt;
  &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Now you can just take your USB drive to any computer with a clean Windows installation and continue developing your Rails applications instantly.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.expressionlab.com/">
    <author>
      <name>hatem</name>
    </author>
    <id>tag:www.expressionlab.com,2008-12-13:172</id>
    <published>2008-12-13T08:33:00Z</published>
    <updated>2008-12-13T09:16:57Z</updated>
    <category term="Thoughts"/>
    <category term="windows"/>
    <link href="http://www.expressionlab.com/2008/12/13/quickly-open-command-prompt-window-on-any-folder-in-windows" rel="alternate" type="text/html"/>
    <title>Quickly Open Command Prompt Window on Any Folder in Windows</title>
<summary type="html">&lt;img title=&quot;Windows&quot; class=&quot;excerpt_image&quot; src=&quot;/assets/2008/10/3/windows.gif&quot; alt=&quot;Windows&quot; /&gt;While developing under Windows XP, I frequently open a Command Prompt window and go through many &lt;strong&gt;cd&lt;/strong&gt; commands to change to a specific folder. This gets worse when the folder is deeply nested. So I searched for a better solution that allows accessing the Command Prompt from Windows Explorer. Good news, I found it!</summary><content type="html">
            &lt;img title=&quot;Windows&quot; class=&quot;excerpt_image&quot; src=&quot;/assets/2008/10/3/windows.gif&quot; alt=&quot;Windows&quot; /&gt;While developing under Windows XP, I frequently open a Command Prompt window and go through many &lt;strong&gt;cd&lt;/strong&gt; commands to change to a specific folder. This gets worse when the folder is deeply nested. So I searched for a better solution that allows accessing the Command Prompt from Windows Explorer. Good news, I found it!
&lt;p&gt;The solution is one of the nice &lt;a href=&quot;http://www.microsoft.com/windowsxp/Downloads/powertoys/Xppowertoys.mspx&quot;&gt;Microsoft PowerToys for Windows XP&lt;/a&gt;. As they state, PowerToys are additional programs that developers work on after a product has been released.&lt;/p&gt;

&lt;p&gt;Just download the &lt;a href=&quot;http://download.microsoft.com/download/whistler/Install/2/WXP/EN-US/CmdHerePowertoySetup.exe&quot;&gt;Open Command Window Here&lt;/a&gt; toy and install it. Once installed, you will find a new item added to the context menu that shows when you right-click any folder. This item will open a Command Prompt window with that folder as your active directory. Nice toy!&lt;/p&gt;

&lt;p&gt;If you are using Windows Vista, you don't need to install anything. Just press the SHIFT key when you right-click a folder to get the same option.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.expressionlab.com/">
    <author>
      <name>hatem</name>
    </author>
    <id>tag:www.expressionlab.com,2008-11-19:165</id>
    <published>2008-11-19T19:14:00Z</published>
    <updated>2008-12-29T07:26:03Z</updated>
    <category term="Thoughts"/>
    <category term="rails"/>
    <category term="thinking sphinx"/>
    <category term="unicode"/>
    <link href="http://www.expressionlab.com/2008/11/19/thinking-sphinx-in-arabic-unicode" rel="alternate" type="text/html"/>
    <title>Thinking Sphinx in Arabic/Unicode</title>
<summary type="html">&lt;img class=&quot;excerpt_image&quot; title=&quot;Sphinx&quot; src=&quot;/assets/2008/10/29/sphinx.gif&quot; alt=&quot;Sphinx&quot; /&gt;While &lt;a href=&quot;/2008/11/2/thinking-sphinx-on-windows&quot;&gt;using Thinking Sphinx&lt;/a&gt; in one of my Rails projects, I needed to search Arabic content. Since Sphinx supports Unicode, I thought that would be easy. But it was not due to the lack of documentation of Unicode support through Thinking Sphinx. So here is what to do to support Arabic (Unicode) search.</summary><content type="html">
            &lt;img class=&quot;excerpt_image&quot; title=&quot;Sphinx&quot; src=&quot;/assets/2008/10/29/sphinx.gif&quot; alt=&quot;Sphinx&quot; /&gt;While &lt;a href=&quot;/2008/11/2/thinking-sphinx-on-windows&quot;&gt;using Thinking Sphinx&lt;/a&gt; in one of my Rails projects, I needed to search Arabic content. Since Sphinx supports Unicode, I thought that would be easy. But it was not due to the lack of documentation of Unicode support through Thinking Sphinx. So here is what to do to support Arabic (Unicode) search.
&lt;p&gt;After reading a little in &lt;a href=&quot;http://www.sphinxsearch.com/docs/&quot;&gt;Sphinx documentation&lt;/a&gt;, I knew that to support non-English languages I had to create a &lt;a href=&quot;http://www.sphinxsearch.com/docs/current.html#conf-charset-table&quot;&gt;charset_table&lt;/a&gt; for Sphinx to use while indexing my data. After some research, I found a nice &lt;a href=&quot;http://www.sphinxsearch.com/forum/view.html?id=1047#5668&quot;&gt;charset table for several languages&lt;/a&gt;. So, I went to the configuration file created by Thinking Sphinx (app/config/development.sphinx.conf) and added an English/Arabic charset_table. I stopped, reindexed and restarted  &lt;strong&gt;searchd&lt;/strong&gt;. Then, tried to search Arabic with no luck! I noticed that my new configuration, including charset_table, was gone! Why? Thinking Sphinx regenerates the configuration file before reindexing!&lt;/p&gt;
&lt;p&gt;After a lot of research, I discovered that to add your custom configuration, you must create the file app/config/sphinx.yml which Thinking Sphinx will use to override its default configuration. Hey, why didn't any one tell me that?!&lt;/p&gt;
&lt;p&gt;After 2 hours of YAML syntax errors, I did it. Here is my sphinx.yml:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;development: &amp;amp;my_settings&lt;br /&gt;  enable_star: true&lt;br /&gt;  min_prefix_len: 0&lt;br /&gt;  min_infix_len: 1&lt;br /&gt;  min_word_len: 1&lt;br /&gt;  charset_table: &amp;quot;0..9, a..z, _, A..Z-&amp;gt;a..z, U+621..U+63a, U+640..U+64a, U+66e..U+66f, U+671..U+6d3, U+6d5, U+6e5..U+6e6, U+6ee..U+6ef, U+6fa..U+6fc, U+6ff&amp;quot;&lt;br /&gt;test:&lt;br /&gt;  &amp;lt;&amp;lt;: *my_settings&lt;br /&gt;production:&lt;br /&gt;  &amp;lt;&amp;lt;: *my_settings&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Other Settings&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt; &lt;strong&gt;&lt;a href=&quot;http://www.sphinxsearch.com/docs/current.html#conf-min-word-len&quot;&gt;min_word_len: 1&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
  Setting the &lt;strong&gt;minimum indexed word length&lt;/strong&gt; to 1 means &lt;strong&gt;&lt;em&gt;index everything&lt;/em&gt;&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;&lt;a href=&quot;http://www.sphinxsearch.com/docs/current.html#conf-min-prefix-len&quot;&gt;min_prefix_len: 0&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
  Setting the &lt;strong&gt;minimum word prefix length to index&lt;/strong&gt; to 0 disables prefix indexing. If set to a positive number, indexer would index  all the possible keyword prefixes (ie. word beginnings) in addition to the keywords  themselves.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;&lt;a href=&quot;http://www.sphinxsearch.com/docs/current.html#conf-min-infix-len&quot;&gt;min_infix_len: 1&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
  Setting the &lt;strong&gt;minimum infix length to index&lt;/strong&gt; to 1  asks the indexer to index all the possible keyword infixes  (ie. substrings) in addition to the keywords themselves. This allows wildcard searching by 'start*', '*end', and '*middle*' wildcards. However, indexing infixes will make the index grow significantly  (because of many more indexed keywords), and will degrade both indexing  and searching times.   Note that  you can't enable both prefix and infex indexing at the same time; that's why I disabled prefix indexing.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;&lt;a href=&quot;http://www.sphinxsearch.com/docs/current.html#conf-enable-star&quot;&gt;enable_star: true&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
  This enables &amp;quot;star-syntax&amp;quot;, or wildcard syntax, when searching  through indexes which were created with prefix or infix indexing enabled.  It only affects searching; so it can be changed without reindexing  by simply restarting &lt;strong&gt;searchd&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, stop, reindex and restart  &lt;strong&gt;searchd&lt;/strong&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rake thinking_sphinx:stop
rake thinking_sphinx:index
rake thinking_sphinx:start&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Finally, for the wildcard search to work, your controller should look something like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;class PostsController &amp;lt; BaseController  &lt;br /&gt;  def search&lt;br /&gt;    @posts = Post.search &amp;quot;*#{params[:search_query]}*&amp;quot;&lt;br /&gt;  end  &lt;br /&gt;end&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You should be enjoying Arabic search now.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.expressionlab.com/">
    <author>
      <name>hatem</name>
    </author>
    <id>tag:www.expressionlab.com,2008-11-19:164</id>
    <published>2008-11-19T17:27:00Z</published>
    <updated>2008-12-29T07:24:10Z</updated>
    <category term="Thoughts"/>
    <category term="aptana"/>
    <category term="eclipse"/>
    <category term="haml"/>
    <link href="http://www.expressionlab.com/2008/11/19/replacing-tabs-with-spaces-in-aptana-studio-soft-tabs" rel="alternate" type="text/html"/>
    <title>Replacing Tabs with Spaces in Aptana (Soft Tabs)</title>
<summary type="html">&lt;img class=&quot;excerpt_image&quot; title=&quot;Aptana&quot; src=&quot;/assets/2008/11/19/aptana.png&quot; alt=&quot;Aptana&quot; /&gt;While &lt;a href=&quot;/2008/11/9/haml-saas-syntax-highlighting-in-aptana-eclipse&quot;&gt;using Haml in Aptana&lt;/a&gt;, I had a problem with line indentation. Since Haml uses space indentation to represent the HTML structure (two spaces for each level), indenting multiple lines with the &quot;tab&quot; characters would result in Haml errors. I tried to search for the word &quot;tab&quot; in Aptana's &quot;Preferences&quot; window but didn't find what I wanted. Here is how to enforce Aptana to replace tabs with regular spaces (soft tabs).</summary><content type="html">
            &lt;img class=&quot;excerpt_image&quot; title=&quot;Aptana&quot; src=&quot;/assets/2008/11/19/aptana.png&quot; alt=&quot;Aptana&quot; /&gt;While &lt;a href=&quot;/2008/11/9/haml-saas-syntax-highlighting-in-aptana-eclipse&quot;&gt;using Haml in Aptana&lt;/a&gt;, I had a problem with line indentation. Since Haml uses space indentation to represent the HTML structure (two spaces for each level), indenting multiple lines with the &quot;tab&quot; characters would result in Haml errors. I tried to search for the word &quot;tab&quot; in Aptana's &quot;Preferences&quot; window but didn't find what I wanted. Here is how to enforce Aptana to replace tabs with regular spaces (soft tabs).
&lt;ol&gt;
  &lt;li&gt;From Aptana &amp;quot;Window&amp;quot; menu, select &amp;quot;Preferences...&amp;quot;&lt;/li&gt;
  &lt;li&gt;In the the preferences window, select &amp;quot;Aptana&amp;quot; &amp;gt; &amp;quot;Editors&amp;quot;&lt;/li&gt;
  &lt;li&gt;In the &amp;quot;General&amp;quot; tab of the &amp;quot;Editors&amp;quot; window, select &amp;quot;Use spaces&amp;quot; under &amp;quot;Tab Insertion&amp;quot;&lt;/li&gt;
  &lt;li&gt;Click the &amp;quot;edit&amp;quot; link besides the &amp;quot;Use spaces&amp;quot; option to open the general &amp;quot;Text Editors&amp;quot; window&lt;/li&gt;
  &lt;li&gt;In the &amp;quot;Text Editors&amp;quot; window, set the &amp;quot;Displayed tab width&amp;quot; to &amp;quot;2&amp;quot;&lt;/li&gt;
  &lt;li&gt;Press &amp;quot;OK&amp;quot;&lt;/li&gt;
  &lt;li&gt;Enjoy two-spaces tabs&lt;/li&gt;
&lt;/ol&gt;
          </content>  </entry>
  <entry xml:base="http://www.expressionlab.com/">
    <author>
      <name>hatem</name>
    </author>
    <id>tag:www.expressionlab.com,2008-11-09:163</id>
    <published>2008-11-09T13:39:00Z</published>
    <updated>2008-11-18T12:37:10Z</updated>
    <category term="Thoughts"/>
    <category term="aptana"/>
    <category term="eclipse"/>
    <category term="haml"/>
    <category term="saas"/>
    <link href="http://www.expressionlab.com/2008/11/9/haml-saas-syntax-highlighting-in-aptana-eclipse" rel="alternate" type="text/html"/>
    <title>Haml/Saas Syntax Highlighting in Aptana/Eclipse</title>
<summary type="html">&lt;img class=&quot;excerpt_image&quot; title=&quot;Haml&quot; src=&quot;/assets/2008/11/9/haml.gif&quot; alt=&quot;Haml&quot; /&gt;&lt;strong&gt;UPDATE: Some people reported problems while downloading the files. Now, you can &lt;a href=&quot;/files/aptana-haml-saas-syntax-highlighting.zip&quot;&gt;download them from here&lt;/a&gt;&lt;/strong&gt;.
&lt;br /&gt;&lt;br /&gt;
Recently, I have been using &lt;a href=&quot;http://haml.hamptoncatlin.com/&quot;&gt;Haml&lt;/a&gt; in some my Rails projects. It simply makes your views clean and readable. One issue I had was syntax highlighting in my favorite IDE, &lt;a href=&quot;http://www.aptana.com/&quot;&gt;Aptana Studio&lt;/a&gt;. The Haml &lt;a href=&quot;http://groups.google.com/group/haml/web/syntax-highlighting&quot;&gt;syntax highlighting support&lt;/a&gt; has been stopped a while ago and more issues have raised after Aptana recent updates.</summary><content type="html">
            &lt;img class=&quot;excerpt_image&quot; title=&quot;Haml&quot; src=&quot;/assets/2008/11/9/haml.gif&quot; alt=&quot;Haml&quot; /&gt;&lt;strong&gt;UPDATE: Some people reported problems while downloading the files. Now, you can &lt;a href=&quot;/files/aptana-haml-saas-syntax-highlighting.zip&quot;&gt;download them from here&lt;/a&gt;&lt;/strong&gt;.
&lt;br /&gt;&lt;br /&gt;
Recently, I have been using &lt;a href=&quot;http://haml.hamptoncatlin.com/&quot;&gt;Haml&lt;/a&gt; in some my Rails projects. It simply makes your views clean and readable. One issue I had was syntax highlighting in my favorite IDE, &lt;a href=&quot;http://www.aptana.com/&quot;&gt;Aptana Studio&lt;/a&gt;. The Haml &lt;a href=&quot;http://groups.google.com/group/haml/web/syntax-highlighting&quot;&gt;syntax highlighting support&lt;/a&gt; has been stopped a while ago and more issues have raised after Aptana recent updates.
&lt;p&gt;After some research, I found a solution posted by Max Kostovetski, a member of Haml Google group. Now, to the steps:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;Download the following files to your hard drive:
        &lt;ul&gt;
            &lt;li&gt;&lt;a href=&quot;http://haml.googlegroups.com/web/haml_lexer.lxr&quot;&gt;http://haml.googlegroups.com/web/haml_lexer.lxr&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href=&quot;http://haml.googlegroups.com/web/haml.col&quot;&gt;http://haml.googlegroups.com/web/haml.col&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href=&quot;http://haml.googlegroups.com/web/sass_lexer.lxr&quot;&gt;http://haml.googlegroups.com/web/sass_lexer.lxr&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href=&quot;http://haml.googlegroups.com/web/sass.col&quot;&gt;http://haml.googlegroups.com/web/sass.col&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;From Aptana &quot;Window&quot; menu, select &quot;Preferences...&quot;&lt;/li&gt;
    &lt;li&gt;In the the preferences window, select &quot;Editors&quot; &gt; &quot;Generic Text&quot; &lt;/li&gt;
    &lt;li&gt;Press &quot;Add...&quot; to add new file extensions: *.haml and *.sass&lt;/li&gt;
    &lt;li&gt;For each of the new extensions, click it and press &quot;Browse...&quot; to select the proper lexer file (*.lxr)&lt;/li&gt;
    &lt;li&gt;For colorization, press &quot;Import...&quot; to import the *.col files&lt;/li&gt;
    &lt;li&gt;Press &quot;OK&quot;&lt;/li&gt;
    &lt;li&gt;Enjoy you Haml views&lt;/li&gt;
&lt;/ol&gt;
          </content>  </entry>
  <entry xml:base="http://www.expressionlab.com/">
    <author>
      <name>hatem</name>
    </author>
    <id>tag:www.expressionlab.com,2008-11-02:162</id>
    <published>2008-11-02T17:46:00Z</published>
    <updated>2008-12-29T07:21:21Z</updated>
    <category term="Thoughts"/>
    <category term="full-text search"/>
    <category term="rails"/>
    <category term="thinking sphinx"/>
    <link href="http://www.expressionlab.com/2008/11/2/thinking-sphinx-on-windows" rel="alternate" type="text/html"/>
    <title>Thinking Sphinx on Windows</title>
<summary type="html">&lt;img class=&quot;excerpt_image&quot; title=&quot;Sphinx&quot; src=&quot;/assets/2008/10/29/sphinx.gif&quot; alt=&quot;Sphinx&quot; /&gt;In one of my Ruby on Rails projects, I needed a full-text search engine to integrate. And after some research, I decided that &lt;a href=&quot;http://ts.freelancing-gods.com/&quot;&gt;Thinking Sphinx&lt;/a&gt; is the way to go. It seemed simple, fast and well documented. Unfortunately, I had some issues when tried to get it running on  Windows.</summary><content type="html">
            &lt;img class=&quot;excerpt_image&quot; title=&quot;Sphinx&quot; src=&quot;/assets/2008/10/29/sphinx.gif&quot; alt=&quot;Sphinx&quot; /&gt;In one of my Ruby on Rails projects, I needed a full-text search engine to integrate. And after some research, I decided that &lt;a href=&quot;http://ts.freelancing-gods.com/&quot;&gt;Thinking Sphinx&lt;/a&gt; is the way to go. It seemed simple, fast and well documented. Unfortunately, I had some issues when tried to get it running on  Windows.
&lt;p&gt;The first step is installing Sphinx itself. While this looks simple, it took me five hours to move to the next step! &lt;/p&gt;
&lt;p&gt;When I checked &lt;a href=&quot;http://sphinxsearch.com/doc.html#required-tools&quot;&gt;Sphinx documentation&lt;/a&gt;, it said that I needed Microsoft Visual C/C++ Studio to compile the source code! What? This is another project. After some (a lot of) research, some people suggested that I just needed to download the binaries, not the source code, and  add the bin folder to the Windows &lt;strong&gt;Path&lt;/strong&gt; environemnt variable. I tried that, but got errors later when tried to index data. So here is what works:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Go to &lt;a href=&quot;http://sphinxsearch.com/downloads.html&quot;&gt;Sphinx downloads page&lt;/a&gt; and download the &lt;strong&gt;Win32 release binaries with MySQL support&lt;/strong&gt;. At the time of writing it is &lt;a href=&quot;http://sphinxsearch.com/downloads/sphinx-0.9.8-win32.zip&quot;&gt;sphinx-0.9.8-win32.zip&lt;/a&gt;. Of course, you should get the one with PostgreSQL support if you need it.&lt;/li&gt;
  &lt;li&gt;Unzip the downloaded file and open the &lt;strong&gt;bin&lt;/strong&gt; folder. Select and copy all files and paste them in your &lt;strong&gt;ruby/bin&lt;/strong&gt; folder. If some files are already exist in your &lt;strong&gt;ruby/bin&lt;/strong&gt; folder, don't replace them.&lt;/li&gt;
  &lt;li&gt;Install the Thinking Sphinx plugin:&lt;/li&gt;
    &lt;pre&gt;&lt;code&gt;ruby script/plugin install git://github.com/freelancing-god/thinking-sphinx.git&lt;/code&gt;&lt;/pre&gt;
  &lt;li&gt;To set a model to be indexed, add some fields and attributes (refer to &lt;a href=&quot;http://freelancing-gods.com/posts/sphinx_a_primer&quot;&gt;the primer&lt;/a&gt;):
  &lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;class Post &amp;lt; ActiveRecord::Base  
  define_index do   
    #sphinx fields
    indexes title
  end  
end&lt;/code&gt;&lt;/pre&gt;
  &lt;/li&gt;
  &lt;li&gt;Tell Sphinx to index the data:
    &lt;pre&gt;&lt;code&gt;rake thinking_sphinx:index&lt;/code&gt;&lt;/pre&gt;
    Now, you may get something like this in your console:
    &lt;pre&gt;&lt;code&gt;rake thinking_sphinx:index
Generating Configuration to F:/InstantRails/rails_apps/community/config/development.sphinx.conf
indexer --config F:/InstantRails/rails_apps/community/config/development.sphinx.conf --all&lt;/code&gt;&lt;/pre&gt;
    It seems that it couldn't continue. To solve this, make sure you copied all the .exe files from 
    &lt;strong&gt;sphinx-0.9.8-win32/bin&lt;/strong&gt; to &lt;strong&gt;ruby/bin&lt;/strong&gt;. If you keep getting the same result,  you may need to copy the &lt;strong&gt;libmySQL.dll&lt;/strong&gt; file from &lt;strong&gt;mysql/bin&lt;/strong&gt; to &lt;strong&gt;ruby/bin&lt;/strong&gt; (check &lt;a href=&quot;/2008/7/10/libmysql-dll-error-with-rails-2-1-on-instantrails&quot;&gt;this post&lt;/a&gt; for details). Now, you should get something like this:
    &lt;pre&gt;&lt;code&gt;Generating Configuration to F:/InstantRails/rails_apps/community/config/development.sphinx.conf
indexer --config F:/InstantRails/rails_apps/community/config/development.sphinx.conf --all
Sphinx 0.9.8-release (r1371)
Copyright (c) 2001-2008, Andrew Aksyonoff

using config file 'F:/InstantRails/rails_apps/community/config/development.sphinx.conf'...
indexing index 'post_core'...
collected 2 docs, 0.0 MB
collected 0 attr values
sorted 0.0 Mvalues, 100.0% done
sorted 0.0 Mhits, 100.0% done
total 2 docs, 27 bytes
total 0.030 sec, 904.37 bytes/sec, 66.99 docs/sec
distributed index 'post' can not be directly indexed; skipping.&lt;/code&gt;&lt;/pre&gt;
    Also, note the newly generated files:
    &lt;ul&gt;
        &lt;li&gt;config/development.sphinx.conf&lt;/li&gt;
      &lt;li&gt;db/sphinx/development/post_core.spa&lt;/li&gt;
      &lt;li&gt;db/sphinx/development/post_core.spd&lt;/li&gt;
      &lt;li&gt;db/sphinx/development/post_core.sph&lt;/li&gt;
      &lt;li&gt;db/sphinx/development/post_core.spi&lt;/li&gt;
      &lt;li&gt;db/sphinx/development/post_core.spm&lt;/li&gt;
      &lt;li&gt;db/sphinx/development/post_core.spp&lt;/li&gt;
    &lt;/ul&gt;
    Great! But what was that last line about? Don't worry, Pat &lt;a href=&quot;http://groups.google.com/group/thinking-sphinx/browse_thread/thread/c4ef6b0c9c35779c&quot;&gt;says it's OK&lt;/a&gt;:
    &lt;blockquote&gt;A distributed index is made up of other indexes. It doesn't need to be  
      indexed, but Sphinx tries to anyway, and then complains when it can't.  
      I'm not sure about the reasoning for this, but it's not important: You  
      can ignore the error, it doesn't stop anything working, searching and  
      indexing will happen as expected.&lt;/blockquote&gt;
  &lt;/li&gt;
  &lt;li&gt;Start a Sphinx &lt;strong&gt;searchd&lt;/strong&gt; daemon:
  &lt;pre&gt;&lt;code&gt;rake thinking_sphinx:start&lt;/code&gt;&lt;/pre&gt;

  You should get something like this:
  &lt;pre&gt;&lt;code&gt;searchd --config F:/InstantRails/rails_apps/community/config/development.sphinx.conf
[Wed Oct 29 14:26:44.390 2008] [ 2796] WARNING: forcing --console mode on Windows
[Wed Oct 29 14:26:44.390 2008] [ 2796] using config file 'F:/InstantRails/rails_apps/community/config/development.sphinx.conf'...
[Wed Oct 29 14:26:44.406 2008] [ 2796] creating server socket on 127.0.0.1:3312
[Wed Oct 29 14:26:44.406 2008] [ 2796] accepting connections&lt;/code&gt;&lt;/pre&gt;
  &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Now, you are ready to search. To test it, you can modify the index action as follows:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;class PostsController &amp;lt; BaseController
  def index
    @posts = Post.search params[:search]
  end  
end&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And your view may look like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&amp;lt;% for post in @posts %&amp;gt;
  &amp;lt;h2&amp;gt;&amp;lt;%=h post.subject %&amp;gt;&amp;lt;/h2&amp;gt;
  &amp;lt;%=h post.body %&amp;gt;
&amp;lt;% end %&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now, navigate to &lt;strong&gt;/posts?search=myword&lt;/strong&gt; where &lt;strong&gt;myword&lt;/strong&gt; is a string that can be found in the title of some of your posts. You should see that the results are filtered according to the keyword sent.&lt;/p&gt;
&lt;p&gt;Congratulations! You are thinking sphinx on Windows.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.expressionlab.com/">
    <author>
      <name>hatem</name>
    </author>
    <id>tag:www.expressionlab.com,2008-10-26:160</id>
    <published>2008-10-26T16:01:00Z</published>
    <updated>2008-12-29T07:05:14Z</updated>
    <category term="Thoughts"/>
    <category term="community engine"/>
    <category term="rails"/>
    <category term="tutorial"/>
    <link href="http://www.expressionlab.com/2008/10/26/installing-communityengine-on-rails-2-1" rel="alternate" type="text/html"/>
    <title>Installing CommunityEngine on Rails 2.1</title>
<summary type="html">&lt;img title=&quot;CommunityEngine&quot; class=&quot;excerpt_image&quot; src=&quot;/assets/2008/10/21/community-engine.gif&quot; alt=&quot;CommunityEngine&quot; /&gt;In &lt;a href=&quot;/2008/10/21/we-chose-communityengine-for-a-rails-social-network&quot;&gt;a previous post&lt;/a&gt;, I talked about  why we chose &lt;a href=&quot;http://www.communityengine.org/&quot;&gt;CommunityEngine&lt;/a&gt;. And due to the lack of documentation and several issues I had, I thought it would be useful to go through the installation steps and handling some issues.</summary><content type="html">
            &lt;img title=&quot;CommunityEngine&quot; class=&quot;excerpt_image&quot; src=&quot;/assets/2008/10/21/community-engine.gif&quot; alt=&quot;CommunityEngine&quot; /&gt;In &lt;a href=&quot;/2008/10/21/we-chose-communityengine-for-a-rails-social-network&quot;&gt;a previous post&lt;/a&gt;, I talked about  why we chose &lt;a href=&quot;http://www.communityengine.org/&quot;&gt;CommunityEngine&lt;/a&gt;. And due to the lack of documentation and several issues I had, I thought it would be useful to go through the installation steps and handling some issues.
&lt;h3&gt;Requirements&lt;/h3&gt;
&lt;h4&gt;Required gems&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Rails 2.1.0&lt;/li&gt;
  &lt;li&gt;rake 0.8.1&lt;/li&gt;
  &lt;li&gt;rmagick&lt;/li&gt;
  &lt;li&gt;hpricot&lt;/li&gt;
  &lt;li&gt;htmlentities&lt;/li&gt;
  &lt;li&gt;RedCloth&lt;/li&gt;
  &lt;li&gt;haml&lt;/li&gt;
  &lt;li&gt;aws-s3 (if using Amazon S3 for photos)&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Notes for Windows users
&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;hpricot: &lt;/li&gt;  
  &lt;pre&gt;&lt;code&gt;gem install hpricot ––source http://code.whytheluckystiff.net&lt;/code&gt;&lt;/pre&gt;
  &lt;li&gt;rmagick:&lt;/li&gt;
  &lt;ol&gt;
    &lt;li&gt;Download the latest version of &lt;a href=&quot;http://rubyforge.org/projects/rmagick/&quot;&gt;rmagick-win32&lt;/a&gt;. At the time of writing, it is &lt;a href=&quot;http://rubyforge.org/frs/download.php/43232/RMagick-2.6.0-ImageMagick-6.4.3-6-Q8.zip&quot;&gt;RMagick-2.6.0-ImageMagick-6.4.3-6-Q8.zip&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Extract the zipped file and run the installer&lt;/li&gt;
    &lt;li&gt;Install the gem you downloaded:&lt;/li&gt;    
    &lt;pre&gt;&lt;code&gt;gem install rmagick --local&lt;/code&gt;&lt;/pre&gt;
    &lt;li&gt;Restart Windows&lt;/li&gt;
  &lt;/ol&gt;
&lt;/ul&gt;
&lt;h3&gt;Installation&lt;/h3&gt;
&lt;ol&gt;
  &lt;li&gt;Create a new Rails app: &lt;/li&gt;
  &lt;pre&gt;&lt;code&gt;rails community -d mysql&lt;/code&gt;&lt;/pre&gt;
  &lt;li&gt;Install the engines plugin:&lt;/li&gt;  
  &lt;pre&gt;&lt;code&gt;ruby script/plugin install git://github.com/lazyatom/engines.git&lt;/code&gt;&lt;/pre&gt;
    &lt;li&gt;Put the community engine plugin into plugins directory:&lt;/li&gt;    
  &lt;pre&gt;&lt;code&gt;git clone --depth 1 git://github.com/bborn/communityengine.git vendor/plugins/community_engine&lt;/code&gt;&lt;/pre&gt;
  &lt;li&gt;Create the databases:&lt;/li&gt;  
  &lt;pre&gt;&lt;code&gt;rake db:create:all&lt;/code&gt;&lt;/pre&gt;
  &lt;li&gt;Rename public/index.html to index_backup.html&lt;/li&gt;
  &lt;li&gt;Modify your environment.rb to look like the following:  
&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;
RAILS_GEM_VERSION = '2.1.0' unless defined? RAILS_GEM_VERSION
&lt;strong&gt;require File.join(File.dirname(__FILE__), '../vendor/plugins/engines/boot')&lt;/strong&gt;
Rails::Initializer.run do |config|&lt;br /&gt;
#resource_hacks required here to ensure routes like /:login_slug work
&lt;strong&gt;config.plugins = [:engines, :community_engine, :white_list, :all]&lt;/strong&gt;
&lt;strong&gt;config.plugin_paths += [&amp;quot;#{RAILS_ROOT}/vendor/plugins/community_engine/engine_plugins&amp;quot;]&lt;/strong&gt;
...
end
&lt;strong&gt;require &amp;quot;#{RAILS_ROOT}/vendor/plugins/community_engine/engine_config/boot.rb&amp;quot;&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
  &lt;li&gt;Modify &lt;strong&gt;all&lt;/strong&gt; environment files ('development.rb', 'test.rb', and 'production.rb') by adding:&lt;/li&gt;  
  &lt;pre&gt;&lt;code&gt;APP_URL = &amp;quot;http://localhost:3000&amp;quot;&lt;/code&gt;&lt;/pre&gt;
  &lt;li&gt;Modify your routes.rb by adding this after any of your own existing routes, but before the default rails routes:&lt;/li&gt;
&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;strong&gt;map.from_plugin :community_engine&lt;/strong&gt;
map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'&lt;/code&gt;&lt;/pre&gt;
  &lt;li&gt;Generate the community engine migrations:&lt;/li&gt;  
  &lt;pre&gt;&lt;code&gt;ruby script/generate plugin_migration&lt;/code&gt;&lt;/pre&gt;
  &lt;li&gt;Migrate the database: &lt;/li&gt;  
  &lt;pre&gt;&lt;code&gt;rake db:migrate&lt;/code&gt;&lt;/pre&gt;
  &lt;li&gt;Run your tests: &lt;/li&gt;  
  &lt;pre&gt;&lt;code&gt;rake test&lt;/code&gt;&lt;/pre&gt;
  &lt;li&gt;Run CommunityEngine test: &lt;/li&gt;  
  &lt;pre&gt;&lt;code&gt;rake community_engine:test&lt;/code&gt;&lt;/pre&gt;
  &lt;li&gt;Start the server:&lt;/li&gt;  
  &lt;pre&gt;&lt;code&gt;ruby script/server&lt;/code&gt;&lt;/pre&gt;
  &lt;li&gt;Go to /signup to create a new user&lt;/li&gt;
  &lt;li&gt;To set a user as admin:&lt;/li&gt;  
  &lt;pre&gt;&lt;code&gt;rake community_engine:make_admin email=user@foo.com&lt;/code&gt;&lt;/pre&gt;
  &lt;li&gt;To activate the user, follow the activation link sent in the email (or appeared in the log after creating the user) or use this query:&lt;/li&gt;  
  &lt;pre&gt;&lt;code&gt;update users set activated_at = current_date where id = 1&lt;/code&gt;&lt;/pre&gt;
  &lt;li&gt;Enjoy!&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Common Issues&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;On Windows, if the app run  without any css and the console shows a warning: Couldn't create the  public file structure for plugin 'community_engine', modify &lt;strong&gt;engines.rb&lt;/strong&gt;,line &lt;strong&gt;147&lt;/strong&gt; to be:&lt;/li&gt;  
  &lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;base_target_dir = File.join(destination, File.dirname(source_files.first)&lt;strong&gt;.gsub!(source, &amp;quot;&amp;quot;))&lt;/strong&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/ul&gt;
&lt;ul&gt;
  &lt;li&gt;If  you get a warning: DEPRECATION WARNING: You're using the Ruby-based  MySQL library that ships with Rails. This library will be REMOVED FROM  RAILS 2.2, do this:&lt;/li&gt;  
  &lt;pre&gt;&lt;code&gt;gem install mysql&lt;/code&gt;&lt;/pre&gt;
&lt;/ul&gt;
&lt;h3&gt;Customization&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;Do &lt;strong&gt;NOT&lt;/strong&gt; edit any file of CommunityEngine plugin so you can replace it when updates are available in the future&lt;/li&gt;
  &lt;li&gt;You can edit &lt;strong&gt;app/config/application.yml&lt;/strong&gt; to override the default configuration defined in &lt;strong&gt;/vendor/plugins/community_engine/engine_config/application.yml&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;Any views you create in your app directory will override those in /vendor/plugins/community_engine/app/views&lt;/li&gt;
  &lt;li&gt;Creating  an identically-named controller in your application's app/controllers  directory, mixes your code with CommunityEngine's (your code takes  precedence)&lt;/li&gt;
  &lt;li&gt;To mix models code, you &lt;strong&gt;must&lt;/strong&gt; require the CommunityEngine's model first (check &lt;a href=&quot;http://rails-engines.org/development/common-issues-when-overloading-code-from-plugins/&quot;&gt;this&lt;/a&gt;). Otherwise, your model would  completely replace CommunityEngine's. For example: app/models/country.rb
&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;require_dependency &quot;#{RAILS_ROOT}/vendor/plugins/community_engine/app/models/country.rb&quot;

class Country &amp;lt; ActiveRecord::Base  
  def self.find_countries
    find(:all, :order =&gt; &quot;name&quot;)
  end  
end
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
  &lt;li&gt;For more info, check the readme file of CommunityEngine: &lt;strong&gt;/vendor/plugins/community_engine/README.markdown&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Resources&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;Home Page: &lt;a href=&quot;http://www.communityengine.org/&quot;&gt;http://www.communityengine.org/&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;GitHub: &lt;a href=&quot;http://github.com/bborn/communityengine/tree/master&quot;&gt;http://github.com/bborn/communityengine/tree/master&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Documentation: &lt;a href=&quot;http://www.communityengine.org/documentation.html&quot;&gt;http://www.communityengine.org/documentation.html&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Google Group: &lt;a href=&quot;http://www.communityengine.org/group.html&quot;&gt;http://www.communityengine.org/group.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
          </content>  </entry>
  <entry xml:base="http://www.expressionlab.com/">
    <author>
      <name>hatem</name>
    </author>
    <id>tag:www.expressionlab.com,2008-10-21:158</id>
    <published>2008-10-21T11:35:00Z</published>
    <updated>2008-12-29T07:07:02Z</updated>
    <category term="Thoughts"/>
    <category term="community engine"/>
    <category term="rails"/>
    <category term="social networking"/>
    <link href="http://www.expressionlab.com/2008/10/21/we-chose-communityengine-for-a-rails-social-network" rel="alternate" type="text/html"/>
    <title>We Chose CommunityEngine for a Rails Social Network</title>
<summary type="html">&lt;img title=&quot;CommunityEngine&quot; class=&quot;excerpt_image&quot; src=&quot;/assets/2008/10/21/community-engine.gif&quot; alt=&quot;CommunityEngine&quot; /&gt;Last week, I and &lt;a href=&quot;http://moustafaemara.wordpress.com/&quot;&gt;Mosta&lt;/a&gt; were about to start a new project at &lt;a href=&quot;http://www.espace.com.eg/&quot;&gt;eSpace&lt;/a&gt;, a social network in Rails. And instead of reinventing the wheel,  we decided to check the &lt;a href=&quot;/2008/5/26/open-source-social-networking-forruby-on-rails&quot;&gt;available&lt;/a&gt; &lt;a href=&quot;/2008/10/13/tog-an-open-source-social-network-platform-for-ruby-on-rails&quot;&gt;solutions&lt;/a&gt; to choose one to build on. Here is why we chose &lt;a href=&quot;http://www.communityengine.org/&quot;&gt;CommunityEngine&lt;/a&gt;.</summary><content type="html">
            &lt;img title=&quot;CommunityEngine&quot; class=&quot;excerpt_image&quot; src=&quot;/assets/2008/10/21/community-engine.gif&quot; alt=&quot;CommunityEngine&quot; /&gt;Last week, I and &lt;a href=&quot;http://moustafaemara.wordpress.com/&quot;&gt;Mosta&lt;/a&gt; were about to start a new project at &lt;a href=&quot;http://www.espace.com.eg/&quot;&gt;eSpace&lt;/a&gt;, a social network in Rails. And instead of reinventing the wheel,  we decided to check the &lt;a href=&quot;/2008/5/26/open-source-social-networking-forruby-on-rails&quot;&gt;available&lt;/a&gt; &lt;a href=&quot;/2008/10/13/tog-an-open-source-social-network-platform-for-ruby-on-rails&quot;&gt;solutions&lt;/a&gt; to choose one to build on. Here is why we chose &lt;a href=&quot;http://www.communityengine.org/&quot;&gt;CommunityEngine&lt;/a&gt;.
&lt;p&gt;The main reason is that CommunityEngine offers a huge list of features that are, by the way, not mentioned on their website!&lt;/p&gt;
&lt;p&gt;Here is the list we discovered after installing it and checking the code:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Authentication (sign up, activation, log in)&lt;/li&gt;
	&lt;li&gt;Roles: admin, moderator, member&lt;/li&gt;
	&lt;li&gt;Internationalization support&lt;/li&gt;
	&lt;li&gt;Theme support&lt;/li&gt;
	&lt;li&gt;User profiles, avatars&lt;/li&gt;
	&lt;li&gt;Basic forums (Beast forums) with moderation and monitorship&lt;/li&gt;
	&lt;li&gt;Friendships and activity feeds&lt;/li&gt;
	&lt;li&gt;User search&lt;/li&gt;
	&lt;li&gt;Blogs with categories and tagging&lt;/li&gt;
	&lt;li&gt;Send post to friend&lt;/li&gt;
	&lt;li&gt;Adding a poll to a post&lt;/li&gt;
	&lt;li&gt;Social bookmarking links&lt;/li&gt;
	&lt;li&gt;Photo uploading and tagging&lt;/li&gt;
	&lt;li&gt;Invitations&lt;/li&gt;
	&lt;li&gt;Events&lt;/li&gt;
	&lt;li&gt;Contests&lt;/li&gt;
	&lt;li&gt;Clippings - visual bookmarking&lt;/li&gt;
	&lt;li&gt;Favoriting of clippings and blog posts&lt;/li&gt;
	&lt;li&gt;Commenting on blogs, profiles, photos, and clippings&lt;/li&gt;
	&lt;li&gt;Comment notification by e-mail&lt;/li&gt;
	&lt;li&gt;Simple ad management&lt;/li&gt;
	&lt;li&gt;Rich text editing&lt;/li&gt;
	&lt;li&gt;Administration&lt;/li&gt;
	&lt;li&gt;Statistics&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Of course, we needed many other features but that was just a great start. And the good news is that CommunityEngine is a plugin that can be easily added to an existing application and can be updated when new updates are available. Also, it uses &lt;a href=&quot;http://rails-engines.org/&quot;&gt;Rails Engines&lt;/a&gt; making it easy to customize.&lt;/p&gt;
&lt;p&gt;On the other hand, currently we are trying to resolve some issues:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Upgrading to Rails 2.1.1, as both CommunityEngine and Rails Engines didn't upgraded it. We are on Rails 2.1.0 now.&lt;/li&gt;
	&lt;li&gt;Supporting PostgreSQL, as we got some errors with some queries when we tried to run on it.&lt;/li&gt;
	&lt;li&gt;Little test errors on Windows machines!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Later, hopefully :-), we may talk about how to handle these issues.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.expressionlab.com/">
    <author>
      <name>hatem</name>
    </author>
    <id>tag:www.expressionlab.com,2008-10-13:157</id>
    <published>2008-10-13T07:11:00Z</published>
    <updated>2008-12-29T07:08:05Z</updated>
    <category term="Thoughts"/>
    <category term="rails"/>
    <category term="social networking"/>
    <link href="http://www.expressionlab.com/2008/10/13/tog-an-open-source-social-network-platform-for-ruby-on-rails" rel="alternate" type="text/html"/>
    <title>tog, An Open Source Social Network Platform for Ruby on Rails</title>
<summary type="html">&lt;img title=&quot;tog&quot; class=&quot;excerpt_image&quot; src=&quot;/assets/2008/10/13/tog.gif&quot; alt=&quot;tog&quot; /&gt;Few months ago, I have talked about some helpful &lt;a href=&quot;/2008/5/26/open-source-social-networking-forruby-on-rails&quot;&gt;open source solutions for building a social network with Ruby on Rails&lt;/a&gt;. Today, a new member has joined the family. Unlike other solutions, &lt;a href=&quot;http://www.toghq.com/&quot;&gt;tog&lt;/a&gt; doesn't believe in generic social networks. Instead, tog is a collection of useful plugins that can easily add social network features to your Ruby on Rails application.</summary><content type="html">
            &lt;img title=&quot;tog&quot; class=&quot;excerpt_image&quot; src=&quot;/assets/2008/10/13/tog.gif&quot; alt=&quot;tog&quot; /&gt;Few months ago, I have talked about some helpful &lt;a href=&quot;/2008/5/26/open-source-social-networking-forruby-on-rails&quot;&gt;open source solutions for building a social network with Ruby on Rails&lt;/a&gt;. Today, a new member has joined the family. Unlike other solutions, &lt;a href=&quot;http://www.toghq.com/&quot;&gt;tog&lt;/a&gt; doesn't believe in generic social networks. Instead, tog is a collection of useful plugins that can easily add social network features to your Ruby on Rails application.
&lt;p&gt;In addition to these useful plugins, tog is released under the unrestrictive &lt;a href=&quot;http://www.toghq.com/info/license&quot;&gt;MIT license&lt;/a&gt; and was designed to make developing and integrating new plugins easy.&lt;/p&gt;

&lt;p&gt;One thing I noticed is that the current plugins don't provide a discussion board or forums functionality. May be this would be my contribution :-)

&lt;p&gt;Here is a summary of the currently available plugins and features included:&lt;/p&gt;

&lt;h3&gt;tog_core&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;Base controllers for member and admin actions&lt;/li&gt;
	&lt;li&gt;Base dashboards controller (public, member and admin)&lt;/li&gt;
	&lt;li&gt;Dependency declaration for common social features (comments, tags, activity, etc.)&lt;/li&gt;
	&lt;li&gt;Abuse and comments management&lt;/li&gt;
	&lt;li&gt;Configuration management&lt;/li&gt;
	&lt;li&gt;Helpers for user interface, config access, etc.&lt;/li&gt;
	&lt;li&gt;Patches and libraries&lt;/li&gt;
	&lt;li&gt;System wide searching functionality&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;tog_user&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;Login, logout and signup processes&lt;/li&gt;
	&lt;li&gt;Password reminder&lt;/li&gt;
	&lt;li&gt;Activation process&lt;/li&gt;
	&lt;li&gt;recaptcha support&lt;/li&gt;
	&lt;li&gt;User login or email as key&lt;/li&gt;
	&lt;li&gt;Administration interface&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;tog_social&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;Profiles (including photos)&lt;/li&gt;
	&lt;li&gt;Groups (including images)&lt;/li&gt;
	&lt;li&gt;Moderated and open groups&lt;/li&gt;
	&lt;li&gt;Public and private groups&lt;/li&gt;
	&lt;li&gt;Invitations for joining a group&lt;/li&gt;
	&lt;li&gt;Bi-directional friendships&lt;/li&gt;
	&lt;li&gt;Followers and fan friendships&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;tog_conversatio&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;Multiblog system&lt;/li&gt;
	&lt;li&gt;Multiauthors blogs&lt;/li&gt;
	&lt;li&gt;Atom subscriptions&lt;/li&gt;
	&lt;li&gt;Blog’s archives&lt;/li&gt;
	&lt;li&gt;Tag clouds per blog and global&lt;/li&gt;
	&lt;li&gt;Draft &amp; published status&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;tog_mail&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;Multiple folders&lt;/li&gt;
	&lt;li&gt;Send messages to your friend list&lt;/li&gt;
	&lt;li&gt;Send messages to a given user&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;tog_picto&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;Photos grouped in photosets&lt;/li&gt;
	&lt;li&gt;Photoset-defined privacy&lt;/li&gt;
	&lt;li&gt;Multiple sized for each photos&lt;/li&gt;
	&lt;li&gt;Comentable, rateable and taggable photos and photosets&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;tog_vault&lt;/h3&gt;
&lt;ul&gt;
	&lt;li&gt;Pages&lt;/li&gt;
	&lt;li&gt;Children pages&lt;/li&gt;
	&lt;li&gt;Helper for include pages on views&lt;/li&gt;
	&lt;li&gt;HTML editor&lt;/li&gt;
	&lt;li&gt;Small publication workflow (draft-approved-published)&lt;/li&gt;
&lt;/ul&gt;
          </content>  </entry>
  <entry xml:base="http://www.expressionlab.com/">
    <author>
      <name>hatem</name>
    </author>
    <id>tag:www.expressionlab.com,2008-10-03:156</id>
    <published>2008-10-03T07:24:00Z</published>
    <updated>2008-10-03T07:50:50Z</updated>
    <category term="Thoughts"/>
    <category term="windows"/>
    <link href="http://www.expressionlab.com/2008/10/3/microsoft-windows-cloud" rel="alternate" type="text/html"/>
    <title>Microsoft Windows Cloud</title>
<summary type="html">&lt;img title=&quot;Windows&quot; class=&quot;excerpt_image&quot; src=&quot;/assets/2008/10/3/windows.gif&quot; alt=&quot;Windows&quot; /&gt;Last Wednesday, Microsoft CEO Steve Ballmer &lt;a href=&quot;http://www.computerworld.com/action/article.do?command=viewArticleBasic&amp;amp;articleId=9115978&quot;&gt;announced releasing a new operating system&lt;/a&gt; within a month. The new operating system is not a replacement of &lt;a href=&quot;http://blogs.msdn.com/e7/&quot;&gt;Windows 7&lt;/a&gt;. It is not intended for normal users neither. Instead, it is intended for developers of Internet-based applications. So, the code name is &lt;strong&gt;Windows Cloud&lt;/strong&gt;.</summary><content type="html">
            &lt;img title=&quot;Windows&quot; class=&quot;excerpt_image&quot; src=&quot;/assets/2008/10/3/windows.gif&quot; alt=&quot;Windows&quot; /&gt;Last Wednesday, Microsoft CEO Steve Ballmer &lt;a href=&quot;http://www.computerworld.com/action/article.do?command=viewArticleBasic&amp;amp;articleId=9115978&quot;&gt;announced releasing a new operating system&lt;/a&gt; within a month. The new operating system is not a replacement of &lt;a href=&quot;http://blogs.msdn.com/e7/&quot;&gt;Windows 7&lt;/a&gt;. It is not intended for normal users neither. Instead, it is intended for developers of Internet-based applications. So, the code name is &lt;strong&gt;Windows Cloud&lt;/strong&gt;.
&lt;blockquote&gt;&quot;We need a new operating system designed for the cloud and we will introduce one in about four weeks, we’ll even have a name to give you by then. But let’s just call it for the purposes of today Windows Cloud,&quot; Ballmer said&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Cloud_computing&quot; title=&quot;Cloud computing&quot;&gt;Cloud computing&lt;/a&gt; is Internet based development and the cloud is a metaphor for the Internet and is an abstraction for the complex infrastructure it conceals.&lt;/p&gt;

&lt;p&gt;Will Windows Cloud include Internet-based versions of the regular Windows applications? May be!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.expressionlab.com/">
    <author>
      <name>hatem</name>
    </author>
    <id>tag:www.expressionlab.com,2008-09-21:146</id>
    <published>2008-09-21T12:59:00Z</published>
    <updated>2008-12-29T07:09:03Z</updated>
    <category term="Thoughts"/>
    <category term="alsaha"/>
    <category term="espace"/>
    <category term="forum"/>
    <category term="jsoor"/>
    <link href="http://www.expressionlab.com/2008/9/21/espace-launches-jsoor-jsoor-lanches-alsaha" rel="alternate" type="text/html"/>
    <title>eSpace Launches Jsoor.. Jsoor Lanches Alsaha</title>
<summary type="html">&lt;img title=&quot;Jsoor&quot; class=&quot;excerpt_image&quot; src=&quot;/assets/2008/9/21/jsoor.gif&quot; alt=&quot;Jsoor&quot; /&gt;Today, &lt;a href=&quot;http://www.espace.com.eg/&quot;&gt;eSpace&lt;/a&gt; has launched &lt;a href=&quot;http://www.jsoor.com/&quot;&gt;Jsoor&lt;/a&gt;, the new spin-off that will offer web development services. Interestingly, on its first day, Jsoor has launched the new version of &lt;a href=&quot;http://www.alsaha.com/&quot;&gt;Alsaha&lt;/a&gt;, the largest Arabic online community.</summary><content type="html">
            &lt;img title=&quot;Jsoor&quot; class=&quot;excerpt_image&quot; src=&quot;/assets/2008/9/21/jsoor.gif&quot; alt=&quot;Jsoor&quot; /&gt;Today, &lt;a href=&quot;http://www.espace.com.eg/&quot;&gt;eSpace&lt;/a&gt; has launched &lt;a href=&quot;http://www.jsoor.com/&quot;&gt;Jsoor&lt;/a&gt;, the new spin-off that will offer web development services. Interestingly, on its first day, Jsoor has launched the new version of &lt;a href=&quot;http://www.alsaha.com/&quot;&gt;Alsaha&lt;/a&gt;, the largest Arabic online community.
&lt;p&gt;It seems that a lot of new surprises are coming soon.&lt;/p&gt;
&lt;p&gt;&lt;img title=&quot;Alsaha&quot; class=&quot;photo&quot; src=&quot;/assets/2008/9/21/alsaha.jpg&quot; alt=&quot;Alsaha&quot; /&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.expressionlab.com/">
    <author>
      <name>hatem</name>
    </author>
    <id>tag:www.expressionlab.com,2008-09-17:49</id>
    <published>2008-09-17T05:50:00Z</published>
    <updated>2008-12-29T07:09:31Z</updated>
    <category term="Thoughts"/>
    <category term="mephisto"/>
    <category term="rails"/>
    <category term="tutorial"/>
    <link href="http://www.expressionlab.com/2008/9/17/installing-mephisto-0-8-on-rails-2-1" rel="alternate" type="text/html"/>
    <title>Installing Mephisto 0.8 on Rails 2</title>
<summary type="html">&lt;img title=&quot;Mephisto&quot; class=&quot;excerpt_image&quot; src=&quot;/images/mephisto/logo.png&quot; alt=&quot;Mephisto&quot; /&gt;Finally I'm done with installing and running mephisto for &lt;a href=&quot;http://www.expressionlab.com/&quot;&gt;ExpressionLab&lt;/a&gt;. ExpressionLab now  is powered by mephisto. However, It was not that easy so I thought documenting it may help me in the future and may save someone else's time. Actually, a lot of time.</summary><content type="html">
            &lt;img title=&quot;Mephisto&quot; class=&quot;excerpt_image&quot; src=&quot;/images/mephisto/logo.png&quot; alt=&quot;Mephisto&quot; /&gt;Finally I'm done with installing and running mephisto for &lt;a href=&quot;http://www.expressionlab.com/&quot;&gt;ExpressionLab&lt;/a&gt;. ExpressionLab now  is powered by mephisto. However, It was not that easy so I thought documenting it may help me in the future and may save someone else's time. Actually, a lot of time.
   &lt;p&gt;Well, if you don't know, &lt;a href=&quot;http://mephistoblog.com/&quot;&gt;mephisto&lt;/a&gt; is a simple, elegant and free Ruby on Rails blogging system that can run fantastic websites like the one you are reading now :)&lt;/p&gt;
   &lt;p&gt;Unfortunately, due to the lack of documentation, especially after &lt;a href=&quot;http://www.mephistoblog.com/2008/4/18/mephisto-hits-0-8-moves-to-github&quot;&gt;releasing mephisto 0.8&lt;/a&gt; that supports Rails 2, it took me a long time to get it installed and running. The good news is that I will show you how I did it. So, to the tutorial...&lt;/p&gt;

&lt;ol&gt;
     &lt;li&gt;First of all, you should know that mephisto 0.8 &lt;a href=&quot;http://groups.google.com/group/MephistoBlog/browse_thread/thread/e3affd5ddcc619c2&quot;&gt;has some issues with Ruby 1.8.7&lt;/a&gt;. So you will have to downgrade to Ruby 1.8.6 if already upgraded. Actually, Rails itself &lt;a href=&quot;http://www.rubyonrails.com/down&quot;&gt;recommends Ruby 1.8.6&lt;/a&gt;.&lt;/li&gt;

    &lt;li&gt;To download mephisto 0.8, I tried &lt;a href=&quot;http://github.com/halorgium/mephisto/commits/rel-0.8&quot;&gt;github&lt;/a&gt; but it did not install successfully. Finally, I found a working version at RailsPlayground. So, go to your hosting shell and download it from &lt;a href=&quot;http://downloads.railsplayground.net/mephisto-0.8-railsplayground.zip&quot;&gt;http://downloads.railsplayground.net/mephisto-0.8-railsplayground.zip&lt;/a&gt;
     &lt;/li&gt;

     &lt;li&gt;Now, extract the file you downloaded:
       &lt;pre&gt;&lt;code&gt;unzip mephisto-0.8-railsplayground.zip&lt;/code&gt;&lt;/pre&gt;
       Then, rename the folder:
       &lt;pre&gt;&lt;code&gt;mv mephisto-0.8 mephisto&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
     &lt;li&gt;Log in to your hosting control panel and create a database, say mephisto_db, and a database user, say mephisto_dbuser. Then, make sure to assign the user to the databse with all privileges.&lt;/li&gt;
     &lt;li&gt;Rename the file database.example.yml to database.yml:
       &lt;pre&gt;&lt;code&gt;mv mephisto/config/database.example.yml mephisto/config/database.ym&lt;/code&gt;&lt;/pre&gt;
     &lt;/li&gt;
     &lt;li&gt;Edit the config/database.yml and update the production database definition to match the database and database user you created:
     &lt;pre&gt;&lt;code&gt;vi mephisto/config/database.yml&lt;/code&gt;&lt;/pre&gt;
     &lt;pre&gt;&lt;code&gt;production:
  adapter: mysql
  database: mephisto_db
  username: mephisto_dbuser
  password: yourpassword
  host: localhost
  &lt;/code&gt;&lt;/pre&gt;
     &lt;/li&gt;
     &lt;li&gt;
         Update your application with latest Rails:
         &lt;pre&gt;&lt;code&gt;cd mephisto
rake rails:update&lt;/code&gt;&lt;/pre&gt;
     &lt;/li&gt;
     &lt;li&gt;
         Create mephisto's database tables:
         &lt;pre&gt;&lt;code&gt;rake db:bootstrap RAILS_ENV=production&lt;/code&gt;&lt;/pre&gt;
     &lt;/li&gt;
     &lt;li&gt;To install mephisto on your main domain, yoursite.com for example, you will need to create a &lt;a href=&quot;http://en.wikipedia.org/wiki/Symbolic_link&quot;&gt;symbolic link&lt;/a&gt; from your public_html direcotry to mephisto’s public directory. Remember to backup your public_html first:
     &lt;pre&gt;&lt;code&gt;mv public_html public_html_backup
ln -s ~/mephisto/public ~/public_html&lt;/code&gt;&lt;/pre&gt;
     Congratulations! You can access your blog using this URL (the slash at the end is a MUST):&lt;p&gt;&lt;strong&gt;yoursite.com/mephisto/&lt;/strong&gt;&lt;/p&gt;
     And the admin site is:&lt;p&gt;&lt;strong&gt;yoursite.com/mephisto/admin/&lt;/strong&gt;&lt;/p&gt;
     &lt;/li&gt;
     &lt;li&gt;To install mephisto on a subdomain, blog.yoursite.com for example, just login to your hosting control panel and create a new subdomain that points to mephisto/public. Now, you can access your blog using this URL (the slash at the end is a MUST):&lt;p&gt;&lt;strong&gt;blog.yoursite.com/&lt;/strong&gt;&lt;/p&gt;
     And the admin site is:&lt;p&gt;&lt;strong&gt;blog.yoursite.com/admin/&lt;/strong&gt;&lt;/p&gt;
     &lt;/li&gt;
     &lt;li&gt;To access the admin site, use the username:admin and password:test&lt;/li&gt;
   &lt;/ol&gt;

   &lt;p&gt;Now, click the &quot;Create new article&quot; at the top to create your first article. You may get an error &lt;/p&gt;&lt;pre&gt;&lt;code&gt;Invalid encoding... bla bla bla&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Don't worry, I've made the search for you. The solution is to edit the vendor/plugins/permalink_fu/lib/permalink_fu.rb as follows:&lt;/p&gt;
   &lt;ol&gt;
     &lt;li&gt;
     Change line 9 to:
     &lt;pre&gt;&lt;code&gt;s = Iconv.iconv(translation_to, translation_from, str).to_s&lt;/code&gt;&lt;/pre&gt;
     &lt;/li&gt;

     &lt;li&gt;
     Change line 90 to:
     &lt;pre&gt;&lt;code&gt;PermalinkFu.translation_to = 'ascii//ignore//translit'&lt;/code&gt;&lt;/pre&gt;
     &lt;/li&gt;
   &lt;/ol&gt;
   &lt;p&gt;Now, with your second try to add your first article, you may get another error:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;Define INLINEDIR or HOME in your environment and try again&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The solution is to edit the mephisto/config/initializers/custom.rb to add this:&lt;/p&gt;
   &lt;pre&gt;&lt;code&gt;ASSET_IMAGE_PROCESSOR = :none&lt;/code&gt;&lt;/pre&gt;   
    &lt;p&gt;Now, the third trial should work.&lt;/p&gt;
    &lt;p&gt;&lt;strong&gt;Congratulation!&lt;/strong&gt; You've just created your first article on mephisto.&lt;/p&gt;
&lt;p&gt;Now, you should change your password. And I recommend you also change your login name as it will appear as the author name for your articles.&lt;/p&gt;
&lt;p&gt;Next time, I may talk about some useful plugins that you can install on your mephisto.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.expressionlab.com/">
    <author>
      <name>hatem</name>
    </author>
    <id>tag:www.expressionlab.com,2008-08-04:27</id>
    <published>2008-08-04T04:00:00Z</published>
    <updated>2008-12-29T07:57:59Z</updated>
    <category term="Thoughts"/>
    <category term="css"/>
    <category term="html"/>
    <link href="http://www.expressionlab.com/2008/8/4/why-100-width-may-damage-the-layout" rel="alternate" type="text/html"/>
    <title>Why 100% width may damage the layout</title>
<summary type="html">&lt;img class=&quot;excerpt_image&quot; title=&quot;CSS&quot; src=&quot;/assets/2008/12/29/css.png&quot; alt=&quot;CSS&quot; /&gt;One of the common mistakes developers make when creating layouts  is specifying a width of 100% when they need the block element to take the full width of its parent element.</summary><content type="html">
            &lt;img class=&quot;excerpt_image&quot; title=&quot;CSS&quot; src=&quot;/assets/2008/12/29/css.png&quot; alt=&quot;CSS&quot; /&gt;One of the common mistakes developers make when creating layouts  is specifying a width of 100% when they need the block element to take the full width of its parent element.
&lt;pre&gt;&lt;code class=&quot;css&quot;&gt;#footer {
  width: 100%;
  margin: 7px;
  padding: 5px;
  border: 1px solid #CCC;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
Why is this a mistake? Because, according to the W3C &lt;a href=&quot;http://www.w3.org/TR/REC-CSS2/box.html&quot;&gt;box model&lt;/a&gt;, when a width or height is explicitly specified for any block-level element, it should determine only the width or height of the content within the box, with the padding, borders, and margins applied afterward. So, if you try to add a padding, border or margin to that block, the content will either overflow or push elements wider than they should be.
&lt;/p&gt;
&lt;p&gt;
The solution is simply not to specify an explicit width for your block. Instead, leave it with its default value, auto, which will make it expand as you want. Now, you can specify any padding, border and margin values with no problems.
&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;css&quot;&gt;#footer {
  margin: 7px;
  padding: 5px;
  border: 1px solid #CCC;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
But if you really need to specify an explicit width for your block, you can use a nested block as described &lt;a href=&quot;/2008/8/3/how-to-avoid-the-ie-box-model-bug&quot;&gt;here&lt;/a&gt;.
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.expressionlab.com/">
    <author>
      <name>hatem</name>
    </author>
    <id>tag:www.expressionlab.com,2008-08-03:26</id>
    <published>2008-08-03T06:44:00Z</published>
    <updated>2008-12-29T07:58:44Z</updated>
    <category term="Thoughts"/>
    <category term="css"/>
    <category term="html"/>
    <category term="internet explorer"/>
    <link href="http://www.expressionlab.com/2008/8/3/how-to-avoid-the-ie-box-model-bug" rel="alternate" type="text/html"/>
    <title>How to avoid the IE box model bug</title>
<summary type="html">&lt;img class=&quot;excerpt_image&quot; title=&quot;CSS&quot; src=&quot;/assets/2008/12/29/css.png&quot; alt=&quot;CSS&quot; /&gt;One of the common bugs of IE is the &lt;a href=&quot;http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug&quot;&gt;box model bug&lt;/a&gt; which affects the box model of any HTML block-level element when the page is in &lt;a href=&quot;http://en.wikipedia.org/wiki/Quirks_mode&quot;&gt;quirks mode&lt;/a&gt;. In brief, IE includes the padding when calculating the width of the block. Personally, I found this very logical and don't like to consider it a bug. But since it violates the W3C standards, it is a bug.</summary><content type="html">
            &lt;img class=&quot;excerpt_image&quot; title=&quot;CSS&quot; src=&quot;/assets/2008/12/29/css.png&quot; alt=&quot;CSS&quot; /&gt;One of the common bugs of IE is the &lt;a href=&quot;http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug&quot;&gt;box model bug&lt;/a&gt; which affects the box model of any HTML block-level element when the page is in &lt;a href=&quot;http://en.wikipedia.org/wiki/Quirks_mode&quot;&gt;quirks mode&lt;/a&gt;. In brief, IE includes the padding when calculating the width of the block. Personally, I found this very logical and don't like to consider it a bug. But since it violates the W3C standards, it is a bug.
&lt;p&gt;One simple approach to avoid this bug is to avoid specifying both width and padding or border for an element. How?&lt;/p&gt;
&lt;p&gt;Say you have a sidebar block for which you need to specify a width, a border and a padding.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&amp;lt;style type=&quot;text/css&quot;&amp;gt;
  #sidebar {
    background-color: #CCCCCC;
    padding: 5px;
    width: 183px;
    border: 1px solid #000000;
  }
&amp;lt;/style&amp;gt;
&amp;lt;div id=&quot;sidebar&quot;&amp;gt;
  Content for sidebar goes here.
&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here is the result in Firefox and IE:&lt;/p&gt;
&lt;p&gt;&lt;img title=&quot;Box Model&quot; src=&quot;/assets/2008/8/23/box_model.jpg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;To avoid the bug, you can simply add a child block to the sidebar. Then, specify the width for the sidebar and specify the border and padding for the child block.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&amp;lt;style type=&quot;text/css&quot;&amp;gt;
  #sidebar {
    background-color: #CCCCCC;
    width: 183px;
  }
  #sidebar_content {
    padding: 5px;
    border: 1px solid #000000;
  }
&amp;lt;/style&amp;gt;
&amp;lt;div id=&quot;sidebar&quot;&amp;gt;
  &amp;lt;div id=&quot;sidebar_content&quot;&amp;gt;
    Content for sidebar goes here.
  &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Now, you get the same results for both Firefox and IE with exactly the same width you specified in your CSS code.&lt;/p&gt;
          </content>  </entry>
</feed>
