<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Bart G. Dev...: Tag Typo</title>
    <link>http://bartgdev.com/articles_controller.rb/tag?tag=typo</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>&lt;b&gt;Dev&lt;/b&gt;eloping well &lt;b&gt;dev&lt;/b&gt;ised applications</description>
    <item>
      <title>Googled description of your Typo blog not your own?  Check your theme.</title>
      <description>&lt;p&gt;Google your Typo powered site and check the description under your page's title in the google results.  You might find that the text is actually coming from your theme's pages.  The theme determines what the final HTML will look like, this includes any data search bots see.  For example, if a site is googled with &lt;a href="http://www.leevigraham.com/"&gt;Leevi Graham&lt;/a&gt;'s Oragami Typo theme &lt;i&gt;(this happens with any theme, not just this one.  I happened to like it)&lt;/i&gt;, the following description showes up:
&lt;/p&gt;

&lt;p&gt;&lt;i&gt;"So what are all these buttons for? BartGDev.com..., has many personalition features for you, the reader…"&lt;/i&gt;&lt;br /&gt;
&lt;/p&gt;

&lt;p&gt;Well that’s not right.  I need something that would introduce my site to anyone scanning the &lt;a href=" http://www.answers.com/topic/googol"&gt;googol&lt;/a&gt; to &lt;a href=" http://www.answers.com/topic/googolplex"&gt;googolplex&lt;/a&gt; of  results.  So here’s what I did.
&lt;/p&gt;

&lt;p&gt;Choose a unique word from this text to find the file where this is coming from.  You can do this by running the following &lt;code&gt;grep&lt;/code&gt; command from your /typo directory:
&lt;/p&gt;&lt;pre&gt;[/typo]$grep –R personalition *&lt;/pre&gt;.
&lt;/p&gt;

&lt;p&gt;I got a match on 3 files:
&lt;/p&gt;

&lt;pre&gt;
  themes/origami/layouts/.svn/text-base/default.rhtml.svn-base:
  themes/origami/layouts/default.rhtml:  
  tmp/cache/META/DATA/ACTION_PARAM/"your_blog_name"/articles/index/.cache:
&lt;/pre&gt;
&lt;/p&gt;

&lt;p&gt;The first is obviously a subversion entry, due to the .svn references.  The second is the actual source of our ‘google text’.  The 3rd is part of the cache.  I’ll get back to it in a minute.  Back up the 2nd matched file (default.rhtml), and with your favorite editor, like pico, edit it.  Add this line just after the &amp;#60;title&amp;#62;...&amp;#60;/title&amp;#62; tags:&lt;br /&gt;&lt;br /&gt;

&lt;code&gt;
  &amp;#60;meta name="Description" content="this text will show up on as a description in a search engine's preview of your site" /&amp;#62;
&lt;/code&gt;
&lt;/p&gt;

&lt;p&gt;My description was showing the first 160 characters, so something that’s equal or longer than that should be enough.  Note that this text will not show up on your site.  &lt;/p&gt;

After saving, you’ll want to go to your site and check the page source the browser gets (Ctrl-U in Firefox).  You might notice that the change didn’t take.  Bolucks!!.. Rubish!!!.. Pisha!!!... you scream.   Well I say “Uno Momento”.  You’re looking at the cached version of this file.  This is the 3rd file you found with the grep command.  You’ll need to delete it before you see your newly edited page.  So go ahead and delete ONLY the .cache file, not directory (&lt;code&gt; tmp/cache/META/DATA/ACTION_PARAM/"your_blog_name"/articles/index/.cache:&lt;/code&gt;).  Now refresh your site and check the page source.  That’s it.  Next time googlebot checks your site, you should have the new description.  Enjoy nice Google Results!
&lt;/p&gt;
&lt;br /&gt;&lt;br /&gt;

Bart
</description>
      <pubDate>Mon, 28 Aug 2006 01:04:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:54c5828a-5eb4-448b-b04e-50c0b46a55e9</guid>
      <author>Bart</author>
      <link>http://bartgdev.com/articles/2006/08/28/googled-description-of-your-typo-blog-page-are-not-your-own-check-your-theme</link>
      <category>Typo</category>
      <category>Google</category>
    </item>
    <item>
      <title>--  Installing Typo on Bluehost  --</title>
      <description>&lt;p&gt;Firstly, you should check out the RubyOnRails guide to your first Rails app &lt;a href="http://wiki.rubyonrails.org/rails/pages/GettingStartedWithRails"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;br /&gt;

&lt;p&gt;Secondly, you should checkout Bluehost’s page on getting started with Rails on their server, &lt;a href="http://helpdesk.bluehost.com/kb/index.php?x=&amp;mod_id=2&amp;id=232"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;br /&gt;

&lt;p&gt;Thirdly, check out the &lt;a href="http://www.bluehostforum.com"&gt;Bluehost Forum&lt;/a&gt; for information.  My experience has been that the posts here are a good start, but alone do not answer any questions in depth.  There’s a lengthy &lt;a href="http://www.bluehostforum.com/showthread.php?t=113"&gt;post&lt;/a&gt; on Typo which is a good start.
&lt;/p&gt;
&lt;br /&gt;

&lt;p&gt;Also, &lt;a href="http://www.paulsturgess.co.uk/articles/show/8"&gt;Paul Sturgess&lt;/a&gt; has a good artical on Rails, and as of this writing, hosts his site with Bluehost.
&lt;/p&gt;
&lt;br /&gt;

&lt;h4&gt;--  Installing Typo on Bluehost  --&lt;/h4&gt;

&lt;p&gt;Typo is the 2nd Ruby On Rails app I’ve installed on Bluehost, but it’s the first which isn’t mine.  The first was straight forward, I followed the Bluehost instructions found &lt;a href="http://helpdesk.bluehost.com/kb/index.php?x=&amp;mod_id=2&amp;id=232"&gt;here&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;The second, is this version of typo you’re hopefully reading right now... hopefully… otherwise there’s a problem... So here’s how I got it done.
&lt;/p&gt;

&lt;p&gt;When I was initially installing Typo, neither Gems nor Rake worked for me, not sure why yet.  I had to download and install Typo manually.  This is easier to do with through the shell, but it's not necessary.  If you want it, Bluehost requires that you provide some additional info to them in order to get shell access.  Mind you that while it’s not absolutely necessary to have it, it is EXTREMELLY helpful.  The following steps will allow you to install Typo, and other apps without the shell.  Also, using the link command to redirect which folder a browser ends up might be a bit more difficult, although I heard it is possible through the cpanel.  
&lt;/p&gt;
&lt;p&gt;Okay, so here’s how I did it…
&lt;/p&gt;

&lt;br /&gt;
&lt;h4&gt;--  Getting the code  --&lt;/h4&gt;
&lt;p&gt;Gems complained with"ERROR:  While executing gem ... (Errno::EACCES)".  This was because mongrel needed to be installed , but couldn’t get done.  I guess I didn’t have proper access to the ruby gems directory.  At 2:00 am, it was time to hack my way through this install, instead of worrying what Bluehost had installed or not.
&lt;/p&gt;

Create a directory to store your code.  I created public/html/work.  Download the code from rubyforge.org using an ftp utility and put it into public_html/work.  In the shell, you can run the following command from that directory:
&lt;br /&gt;&lt;code&gt;$wget http://rubyforge.org/frs/download.php/11908/typo-4.0.0.tgz 
&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;
&lt;br /&gt;# Untar the code and setup your directories:
&lt;br /&gt;$tar -xzvf typo-4.0.0.tgz

&lt;br /&gt;$rm -rf ~/public_html/blog
&lt;/code&gt;
&lt;p&gt;If you want to have typo on a subdomain (blog.mysite.com), create it using cpanel.  It will exist with a folder in your public_html:
&lt;br /&gt;&lt;code&gt;$ln -s ~/typo/public ~/public_html/blog&lt;/code&gt;
&lt;/p&gt;

&lt;p&gt;If you want to have typo right off of your domain (www.mysite.com), first create an addon domain using cpanel.  Next, delete the addon folder in public_html that was just created, and link the same name to typo’s public folder:
&lt;code&gt;
&lt;br /&gt;$rm -rf ~/public_html/blog
&lt;br /&gt;$ln -s ~/typo/public ~/public_html/blog
&lt;/code&gt;
&lt;/p&gt;

&lt;p&gt;Note: 
  &lt;ul&gt;
    &lt;li&gt;rm –rf removes folders even if there’s content in them&lt;/li&gt;
    &lt;li&gt;ln –s creates a symbolic link.  So when your browser opens up your site, the server directs it to your public_html/domain folder, which is “symbolically” pointed to typo/public&lt;/li&gt;
  &lt;/ul&gt;

&lt;br /&gt;
&lt;h4&gt;--  Create the necessary databases  --&lt;/h4&gt;

&lt;p&gt;You can create the development database and use it by default, or you can jump right into production.  You’ll need to update some files to point to production, as development is set by default.  I list the changes a little further down.
&lt;/p&gt;

&lt;p&gt;Use phpMyAdmin to setup your dev or prod database, as per bluehost’s instructions &lt;a href="http://helpdesk.bluehost.com/kb/index.php?x=&amp;mod_id=2&amp;id=232"&gt;here&lt;/a&gt;.
&lt;/p&gt;

&lt;br /&gt;
&lt;h4&gt;--  Creating Tables  --&lt;/h4&gt;

&lt;p&gt;Rake did not work for me so I had to do the database set up manually.  This just meant running the contents of the sql schema in 
/typo/db/schema.mysql.sql, via phpMyAdmin on the USERNAME_PRODDB database.  Open the SQL tab, and copy/paste the contents of this file right in, and press “Go!”.  It should have created all necessary tables.
&lt;/p&gt;

&lt;p&gt;In the shell you can execute this command from the typo directory:
&lt;code&gt;&lt;br /&gt;$mysql USERNAME_PRODDB -DBUSER -PSW &amp;#60;&amp;#47;db schema.mysql.sql&lt;/code&gt;
&lt;/p&gt;

&lt;p&gt;Next you’ll need to update the /typo/config/database.yml which tells typo what your database is, and what the login parameters are.  This is standard for any Rails application.
&lt;/p&gt;

&lt;p&gt;Now there’s a catch here with the databases.  phpMyAdmin did not synchronize with the /typo/config/database.yml file right away.  I spent quite a while trying different configurations before realizing that the results were inconsistent and that something was simply not synchronizing.  It would sometimes synch after several (approx 15) minutes, or not at all.    I’ve been told it might be a version issue.  Bluehost currently has the mysql 2.7 gem installed.  The solution is to force the database to synch by re-adding your db user into the database.  Recreate the same DB name and password you used originally, overwriting the one that’s there, without deleting the original (just override).  This will force the databse to resynch and pick up your database.yml changes.  The yml file should of course be in synch with your database.  
&lt;/p&gt;

&lt;br /&gt;
&lt;h4&gt;--  Setting Typo to Production  --&lt;/h4&gt;

&lt;p&gt;Add the following lines to these files:
&lt;code&gt;
&lt;br /&gt;typo/config/environment.rb
&lt;br /&gt;ENV['RAILS_ENV'] = 'production'
&lt;br /&gt;
&lt;br /&gt;typo/public/.htaccess
&lt;br /&gt;SetEnv RAILS_ENV production
&lt;/code&gt;
&lt;/p&gt;

&lt;/h4&gt;--  Application Error  --&lt;/h4&gt;
&lt;p&gt;'Application error. Typo failed to start properly'
This would occur periodically.  It can be caused by many things, but because it occurred periodically, I thought it might be a performance issue due to the lack of FastCGI and paths.  After making the following changes, I haven’t received the message.
&lt;/p&gt;

&lt;p&gt;Set dispatcher path in "typo/public/dispatch.rb"
Old Line:
&lt;code&gt;&lt;br /&gt;#require "dispatcher"&lt;/code&gt;

New Line:
&lt;code&gt;&lt;br /&gt;"/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/dispatcher"&lt;/code&gt;


&lt;h4&gt;--  FastCGI  --&lt;/h4&gt;
&lt;p&gt;Bluehost has Fast CGI installed, you just need to point your app to it.
typo/public/.htaccess
Content (comments optional):
&lt;code&gt;
&lt;br /&gt;#*************************
&lt;br /&gt;# General Apache options
&lt;br /&gt;AddHandler fastcgi-script .fcgi
&lt;br /&gt;AddHandler cgi-script .cgi
&lt;br /&gt;#Options +FollowSymLinks +ExecCGI
&lt;br /&gt;#-----------------------------------
&lt;br /&gt;#*************************
&lt;br /&gt;SetEnv RAILS_ENV production
&lt;br /&gt;#-----------------------------------
&lt;br /&gt;#*************************
&lt;br /&gt;RewriteEngine On
&lt;br /&gt;#-----------------------------------
&lt;br /&gt;#*************************
&lt;br /&gt;RewriteRule ^$ index.html [QSA]
&lt;br /&gt;RewriteRule ^([^.]+)$ $1.html [QSA]
&lt;br /&gt;RewriteCond %{REQUEST_FILENAME} !-f
&lt;br /&gt;RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]		# &lt;br &lt;=change to dispatch.cgi
&lt;br /&gt;#-----------------------------------
&lt;br /&gt;#*************************
&lt;br /&gt;ErrorDocument 500 "&amp;#60;h2&amp;#62;Application error&amp;#60;/h2&amp;#62;Typo &amp;#60;br /&amp;#62;failed to start properly"
&lt;/code&gt;
&lt;/p&gt;

&lt;h4&gt;--  CHMOD 755  --&lt;/h4&gt;
&lt;p&gt;One last thing!!! Remember to give everything in the typo/public/*.* folder CHMOD 755 access.  Otherwise you won’t be able to access anything through a browser.
&lt;/p&gt;

&lt;p&gt;Some FTP applications set fields to 644 by default.  Watch out for this when uploading quick changes and all of the sudden your app is not found at all.
&lt;/p&gt;
</description>
      <pubDate>Mon, 07 Aug 2006 02:08:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:b207709b-ec81-452b-88f1-d0f3406bd407</guid>
      <author>Bart</author>
      <link>http://bartgdev.com/articles/2006/08/07/installing-typo-on-bluehost</link>
      <category>Rails</category>
      <category>Typo</category>
      <category>Bluehost</category>
      <category>Rails</category>
      <category>Ruby</category>
    </item>
  </channel>
</rss>
