Use the Spacebar or click on the Emenoh logo to access the global navigation menu
Go Back

Forward

I started working on a Ruby on Rails application a few days ago and decided today that I should blog about it - mostly for myself - *looks around at 0 comments everywhere*.

What I've done so far

Okay, so I also just upgraded my Macbook Pro to 10.6 which changed a few things that I had set up in the development web server department. I'll get into some of those later as I walk through my first steps with ROR. What this means is that I decided to update a few things before getting started on the application itself.

  • MySQL is now running 64 bit on my MBP - Mac OS X 10.5 (x86_64) to be exact
  • Ruby and Gems are also 64 bit thanks to this article on HiveLogic
  • I installed Passenger for Apache2 and the Passenger Pref Pane which makes setting up local Rails apps deployments via Apache2 a snap
  • Added MySQL support the easy way -"sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql"
  • I created my Rails App - "%> rails *myapp* -d mysql"
  • Added the Authlogic plugin "sudo gems install authlogic"
  • Followed some instructions to get a quick example of a login form working
  • Followed a different tutorial on how to enable forgotten password email temporary password link support
  • Added support for using Gmail's SMTP server with the following config/environment.rb addition:

    First a link to where I got it, scroll to the bottom and look for Ivan's post July 07 2009 14:16. This is the correct syntax for Rails 2.2.3

    config.action_mailer.delivery_method = :smtp
    config.action_mailer.smtp_settings = {
    :enable_starttls_auto => :true,
    :address => "smtp.gmail.com",
    :port => 587,
    :domain => "mysite.com.br",
    :authentication => :plain,
    :user_name => "myaddress@mysite....",
    :password => "xxxxxxx",
    :tls => :true
    }
    config.action_mailer.perform_deliveries = :true
    config.action_mailer.raise_delivery_errors = :true
    config.action_mailer.default_charset = "utf-8"

Oh and I didn't do everything in exactly that order, but it's all working fine and I expect it would still be fine if I had done it in this order.

Next Steps

  • Add a User Profile Model - yes users can have more than one...
  • Update my User model
  • Add my web service controller to get JSON data from a user profile
  • Add Authlogic single token authorization logic for API Key access

Write a comment

  • Required fields are marked with *.