Category: Typo

Is this "Less Fail"? Why I’m Replacing Typo

Posted by on October 21, 2008

Typo is blog software written in Ruby, and available as a gem for Rails. It’s what is currently running this website. It’ has it’s pluses but over time it’s grown aggravating to me. I’ve decided to move on to another platform, but I’m not sure which at this point.

If by the time you are done reading this post you feel like Typo would be a good fit for you, you can download Typo and try it yourself. I’m by no means the expert in these matters, and what might not work for me might be right up your alley.

Why I picked Typo in the first place

When I was originally looking for a blog software to use I had these basic requirements:

  • Not what everyone else was using(Wordpress, Blogger)
  • Not written in PHP

I didn’t want to use what everyone else was using because in most things – I like to be different. The fact is that I am different from most people, and I tend to make that known.

I wanted to use a product that was not written in PHP because as an aspiring programmer, I’d rather be using a more cutting edge language like Ruby or Python. Not only is the code of Ruby/Python easier to write and the languages more interesting, but the jobs you get when you know them pay very much more than with PHP, whose programmers are a dime a dozen. I’m not saying that it’s not worth knowing – indeed PHP may be the most useful language to know due to it’s ubiquity. Also, I don’t want to offend any of the PHP programmers who may be reading – I’m envious of your skills(read: skillz).

Ok, so why Typo? Well looking back I didn’t look into things all that well. I ended up turning all the negatives into positives which isn’t a very smart thing to do. At some point, mostly for very shallow reasons I decided that Ruby was a little cooler than Python, so having eliminated all of the Python blog software(there aren’t many) I had a very very short list to choose from. When I tried the demo of Typo I was fairly impressed by the admin interface. Also even though there were very few themes available, I really liked the one I have applied here(scribbish).

What I don’t like about Typo

Lack of community

One thing about open-source software is that it really needs a large and active community. This is extremely evident when you start using projects like Drupal, Ubuntu, Eclipse, and so on. Typo is not like that at all. It’s basically just one person developing with a few other making commits. This really leads to nowhere fast.

If you read the first blog post I wrote on this website you’ll see the difficulty I encountered just getting up and running. This was due almost entirely because of Typo development that wasn’t keeping pace with the development of it’s fundaments – Ruby/Rails. Even after working around the issues I was having, an entire section of my admin area is broken. Looking in the svn repo for Typo I’ve found that there is an experimental branch for Ruby 1.8.7, but it’s pretty clear that it’s not going to be finished before Ruby increments again.

Lack of features

Obviously since this is an open-source project, this is intimately tied to the lack of community – but there are things that should have been available at the outset. For example: users(myself included) cannot log into the public side of the website. This makes it very annoying for commenters – having to retype their info each time, and not being able to edit their comments – but also for me If I want to edit anything I have to do it from the admin side.

Another feature missing that is somewhat related to front-side logging in is a feature that I first saw in WP – private posts. The ability to make a post that only permitted users can see is essential for the entire concept of weblog. The idea that everything I publish should be public is ludicrous.

Plug-ins. Again, because plug-ins are almost by definition community contributed I wouldn’t expect to see too many of them – but the number available is really pathetic. Less than 20 are available, and almost all are totally useless to 99.9% of people on the internet.

This brings me to my next point:

Why I’m dumb

I managed to turn every one of the things I’ve identified as negative about Typo into a positive.

Q: Don’t you want to use a product with a huge community? A: No, I want to be different!

Q: Don’t you want to have thousands of plug-ins available? A: I’ll just write whatever I need!

Q: Don’t you want blogging to be easy? A:

So yeah, now I realize that if you want to actually, say, write blogs then you have to have the time to do that. I want to learn Ruby – of course – but I want to write quick blogs about my accomplishments too. Starting a blog as a learning project means you have neither a blog or a project – just a bunch of stagnation. In my case I opted to write blog after blog and never have the features I wanted, feeling pissed off all the while. not good.

So, what to use now?

Honestly I’m leaning towards WordPress. It’s the obvious choice for obvious reasons, but until I have a couple hours to look again at all of the(free, open-source) options – I can’t make a final decision.

I’d still like to look at Ruby/Python blog softwares, and this time not because I want a pet project. I’ll look at performance issues – I know that Ruby, but especially Python will outperform PHP, but after caching is taken into account the difference may be negligible.

I don’t think WordPress is inherently insecure – as some assert it is due to it’s open-source nature(unlike windoze, which is SO secure!), but it might be vulnerable due to it’s high usage and therefore high rate of attack(just like windoze!). But that’s all anecdotal – I don’t know security in general much less the minute details of the WP code.

Mephisto is another Ruby blog, but it looks like it suffers from the same problems as does Typo. I’d love to do either one of these if I could get paid to work on them.

Anyway…I’ll just keep looking around for now. Post a comment if you want to make a suggestion! (Sorry it won’t remember your user info and I won’t be notified of new comments)

How to Install Typo at A2hosting

Posted by on September 24, 2008

I’m new at A2hosting, and just went through almost a weeks worth of back and forth with their tech support folks. Being that their wiki on installing a Typo blog is out of date – I thought I’d make this my first post on my new blog.

Prep

The first thing you’ll want to do is submit a ticket to have Rails 2.0.2 installed. The default Rails 2.1.1 will not work with Typo at this time. There is an experimental branch of Typo to support Rails 2.1.1, but being new to RoR – I didn’t want to go that route. Also, if you haven’t already – you might want to ask them to install wget for you, as it’s what I use to download stuff from the command line. You can use curl if you are comfortable with it also.

While A2hosting is working on getting Rails ready to go, you can use cPanel to setup your MySQL and ruby app.

Set up your database

From the cPanel front page:
  1. Click ‘MySQL Databases’
  2. Name your new database ‘typo’ and hit ‘Create Database’ (Your username will be prefixed to the database name, i.e. ‘johndoe_typo’)
  3. Scroll down the page a bit and add a new user called ‘typo’ and set a password(write this down) – hit ‘Create User’ (Your username will be prefixed to the database name, i.e. ‘johndoe_typo’)
  4. Scroll back down and add the user to the database – select the user and database from the dropdowns and hit ‘Add’, on the resulting page, check the “ALL PRIVILEGES” box and hit ‘Make Changes’

Create your Rails app

To be honest, I’m not totally sure this step is necessary. When working with A2hosting tech support, they claimed that their rails app showed up automagically when they extracted the typo archive into their web directory, which is the next step, but this didn’t happen for me, so here’s what I did instead:

You will need an empty directory to put your app. I’d suggest

mkdir ~/www/typo

Then head back to the cPanel frontpage and look for ‘Ruby on Rails’

  • app name = typo
  • path = public_html/typo (www is a symlink to public_html)
  • load on boot = checked
  • environment = production (you could go with development, and should switch it if you have issues – but for now just go with production)
  • Hit ‘Create’
  • Create the rewrite you want(This is necessary if you want to use a rails app, but you can redirect the root directory of your domain like I’ve done)

Now you’re going to say I’m crazy – but go back to your shell and blow away the directory we created earlier

rm -rf ~/www/typo

Like I said, this was really just to get the typo app listed in cPanel so that we can start/stop it, create a re-write, and toggle the other settings. We are going to recreate the typo directory but populate it with the actual Typo code in the next step.

Download Typo

After Rails 2.0.2 is installed, you can go ahead and download Typo. Connect to your server via ssh and then do the following:


wget http://rubyforge.org/frs/download.php/42257/typo-5.1.3.tgz
tar xzvpf typo-5.1.3.tgz
mv typo-5.1.3 typo

Configure the database connection

First things first, rename database.yml.example to database.yml:


mv ~/www/typo/config/database.yml.example ~/www/typo/database.yml

Now use your favorite text editor to make database.yml look like this(use the username/password and database names you created earlier):

login: &login
  adapter: mysql
  host: localhost
  username: yourusername_typo
  password: yourpassword
  database: yourusername_typo

development:
  database: yourusername_typo
  <<: *login

test:
  database: yourusername_typo
  <<: *login

production:
  database: yourusername_typo
  <<: *login

Strictly speaking, you’re all set – but there are some issues that I had to work though before Typo started working for me.

Fixes

A couple issues came up at this point for me. A2hosting support was kind enough to provide one of these, but after some chiding from them – I was forced to look up the other myself ;)

  1. Open up ~/www/typo/config/boot.rb and browse down to line 29. The line begins with ‘require_gem’ and needs to be replaced with just ‘gem’. Apparently this is depreciated code, and I suspect it has at least something to do with the next fix.
  2. Open up ~/www/typo/app/models/article.rb and pop down to line 296 and add:


#Added per http://www.typosphere.org/issues/show/1264 to correct error upon managing content
  def published?
    published
  end

Both of these issues are probably caused by A2hosting using Rails 1.8.7 and Typo supporting 1.8.6 – but they seem to be workable this way. I’d be curious if anyone else tries downgrading to 1.8.6 and skipping these 2 steps.

Start yer app!

Go back into cPanel, Ruby on Rails section and hit ‘Run’ for your Typo app. After the confirmation screen, use the ‘Go back’ link and make sure it says “Running” and not “Not running”. If it’s going – direct your browser to whatever url you designated in your rewrite(or click the ‘URL’ link in the app table). There should be/might/will be a delay while the Typo database structure is set up – then you’ll create your first user.

If your app is not running at this point – please do leave a comment. It may be that I’ve left something out.

The rest is up to you!