Tuesday, October 23, 2007

Attracting Users

So, the Dazlus appears to be successful in the sense that users are able to get the things done they need to do - set up an actors profile, add photos, and link to videos. I haven't had any complaints, and I have a pretty good conversion rate.

So the next challenge, the real challenge is getting users to come to the site in the first place. I'm trying a number of strategies. My second post on Craigslist was flagged and removed. Wrong category I think. I believe if we could post some projects and roles we'd get a lot more signups and have a valid reason to post to Craigslist.

We'll see if we can get this in place next.

I've also signed up for a number of bulletin boards where actors hang out and talk about strategies to improve their careers, and I'm trying to get into those conversations where it makes sense. A couple clicks now come from these links.

Also, this blog seems to send a relatively lot of traffic to Dazlus.

And, for SEO, I'm adding some features that should help. Thanks to Tony Wright for his suggestions at the last Seattle Tech Startups meeting.

Monday, October 15, 2007

Exciting day

So I posted some details about Dazlus on craigslist - inviting people to try it out and to submit feedback. Here's my post...

It's gone really well. I was hoping to get 3 users at least, and that took about 4 hours. In the last hour of the day, we had another 4 sign up and create profiles giving us 7 on the day. Actors and performers appear to be more active at night. Go figure.

Here's some of the profiles from our first users:

Wednesday, October 10, 2007

Rails Cookies in a view

I never really found an answer to this anywhere, but it looks like Rails does not allow access to the cookies object in the view. You have to access it as @cookies. I suspect this is so you won't set a cookie in the view, but I don't really know why that's an issue. I was trying to access it to see what was in it while testing.

Also - it appears the default behavior of the cookie expires property is 'now', not 'never' as stated in the DHH's rails book, (Feb 2006).

So - to get the "remember me" cookie to act as I wanted - I set the expires to be far off in the future. Good enough for my purposes.

cookies[:user_id] = {:value =>, :expires => 1.years.from_now }

I don't know if there is a security issue with this at this point. Storing the users ID locally and using only that to sign in sounds like a security problem. I'll do something to hide this if so.

Tuesday, October 09, 2007

Rake Tasks and Cron Jobs on Webmin

Learning all sorts of new stuff lately...

Rake Tasks are great. You can access your database through Rails to do whatever you want. In my case, I wanted to email fans on with any profile changes that may have occurred by their idols (the profile of which they have indicated they are a fan).

IE - If Bob adds a new photo, his fans get an email later in the day letting them know about it with a convenient link to go in and see it.

This is pretty easy - though a little tricky at Joyent to set up the cron job. Joyent is my service provider. To get cron job set up here, you need to do two commands: 1) cd to the app directory and 2) run the rake task.

To do this - a command like this works:
cd /path/to/rails/app && /usr/local/bin/rake RAILS_ENV=production mail:fan_news
You have to cd to the rails app first. If not you will see permission denied errors.

I'm also using Cron + Rake to send me updates about the site - checking regularly to see if there are any broken pages and to send me an email if so. Very handy tool to know about.

Friday, October 05, 2007

Released Dazlus

So, the project I've been working on for a month,, was opened to the public today. It's a site aimed at aspiring actors, dancers, models, etc. I'm really happy with the development of it. Went very smoothly. I learned a lot and got a better handle on more aspects of development - databases, server configuration, 3rd party integrations - things a web developer doesn't usually mess with.

I started one month ago on Sept 5th, same day Ryan started Kindergarten.

Lots more to do, of course, but hopefully I'll start getting some feedback and be able to let the customer design the site from now on.

Thursday, October 04, 2007

FastCGI File Upload error

This error was tough to track down. I have a really simple rails app running using mini_magick and FastCGI and Lighttpd. I got the following error when I tried to upload an image that was greater than 120K

[04/Oct/2007:19:33:42 :: 28348] Dispatcher failed to catch: protocol error (FCGI::Stream::ProtocolError)
/usr/local/lib/ruby/1.8/cgi.rb:980:in `read'
/usr/local/lib/ruby/1.8/cgi.rb:980:in `read_multipart'
/users/home/dazlus/web/public/../config/../vendor/rails/actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb:20:in `initialize_query'
/usr/local/lib/ruby/1.8/cgi.rb:2275:in `initialize'
(eval):16:in `initialize'
/usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:612:in `new'
/usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:612:in `each_cgi'
/usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:609:in `each'
/usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:609:in `each_cgi'
/users/home/dazlus/web/public/../config/../vendor/rails/railties/lib/fcgi_handler.rb:53:in `process!'
/users/home/dazlus/web/public/../config/../vendor/rails/railties/lib/fcgi_handler.rb:23:in `process!'
almost killed by this error

Looking into it, there wasn't much on the web. I found some general posts about a cgi.rb issue with FastCGI that crashes for certain file types. I saw a couple posts about tmp directory file size limits. But neither was it. I then found some reports about FastCGI errors and Mongrel is recommended at, so I switched to Mongrel and I had no trouble afte that.