Setting Up Akelos On Os X Snow Leopard

Setting up Akelos on OS X Snow Leopard

Introduction

When I recently tried getting started with Akelos, I realised that the required setup for Mac OS X Snow Leopard (10.6) is neither described nor does it match the available tutorials or “Getting Started”s. When I finally got to the point that I had Akelos running on my Mac with MAMP, I decided to do a quick Setup Guide to make it easier for others having the same issues.

Prerequisites

  1. Mac OS 10.6 Snow Leopard is installed
  2. MAMP (Mac Apache, MySQL, PHP) is installed to your /Applications/ folder
  3. A Terminal window is open (/Applications/Utilities/Terminal.app)
  4. If you have upgraded to Snow Leopard (not fresh installation) you may want to install the latest version of MySQL

Getting Started

Prepare MAMP

Apache Web-Server

I'd recommend to have the following setup for your MAMP Web-Root:

/Applications
  /MAMP
    /htdocs
      /public_html
        /link_to_public_folders
      /akelos_framework_folder
      /any_akelos_project_folder

This means, you do the follwing steps:

  1. Open the folder /MAMP/htdocs/
  2. Create a new folder named “public_html”
  3. Start the MAMP application /MAMP/MAMP.app
  4. Go to “Settings > Apache”
  5. Change the path to ”/Applications/MAMP/htdocs/public_html” & confirm with OK

MySQL Database-Server

You need to make a connection (called “symlink”) between the MySQL-Socket of MAMP and the one delivered by Mac OS X.

  • Switch to the Terminal window
  • Execute the following commands (requires your administrator password):
sudo mkdir /var/mysql
sudo chown _mysql /var/mysql
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock

Please check the connection to MAMP's MySQL Server with the following Terminal commands:

/Applications/MAMP/Library/bin/mysql -uroot -proot -P 8889

If everything is fine, it should say “Welcome to the MySQL monitor.” in your Terminal window.

Now launch MAMP.app and start both, the Web- and Database-Server.

Grab Akelos

You need a local copy of the Akelos Framework now. Get it either via Subversion Checkout or simply download the latest stable release.

Put the “akelos” folder to following directory:

/Applications/MAMP/htdocs/

Setup your Project

Unfortunately it looks like you need to setup a new project more or less only via Terminal - the Akelos Web Configuration Wizard seems to be broken due to some unknown reason. But don't mind, I'll describe step by step how this works. In my example, I will stick to the Booklink Tutorial.

  • Switch to the Terminal window
  • Execute the following commands:
cd /Applications/MAMP/htdocs/akelos
./script/setup -d /Applications/MAMP/htdocs/booklink -p /Applications/MAMP/htdocs/public_html/booklink

A new project folder named “booklink” has now be created under /MAMP/htdocs/ (this is the main project folder) and a link to it's public folder (for visitors of your project website) has been put into /MAMP/htdocs/public_html/.

Now you can configure your project and let Akelos create the databases (you can confirm the default values with [RETURN]):

  • Switch to the Terminal window (☞ hint)
cd /Applications/MAMP/htdocs/booklink
./script/configure -i
Database name: [RETURN]
Database type: [RETURN]
Database user: root
Database password: root
Development database name: [RETURN]
Production database name: [RETURN]
Testing database name: [RETURN]
Application Locales: [RETURN]

Hint

→ In case you get an error “Could not connect to the database” in the Terminal, you should use a MySQL-GUI-Application (such as YourSQL orSequel Pro) to create the databases manually and proceed the configuration by pointing your Webbrowser to http://localhost:8888/booklink/.

Alternatively, open app > config > database.yml and set the host from localhost to 127.0.0.1

The databases have now been setup, the configuration was successful if you see the message “Your application has been configured correctly”.

Your project website should be available on http://localhost:8888/booklink/ (Akelos “Welcome aboard” screen).

Closing Words

Your Project is properly setup and ready that you can get your hands on it. Follow the next instructions from the Booklink Tutorial starting at chapter “The booklink database structure”.

References used

  • MAMP Forum Thread “Using terminal to connect to MAMP mysql”
  • Akelos Forum Thread “Stuck on install - “Could not load inflector rules file” and “Could not connect to the database””
  • Akelos Forum Thread “Problem with MySQL database”
 
setting-up-akelos-on-snow-leopard.txt · Last modified: 2010/10/26 12:00 by 173.212.211.28
 

The Akelos Framework was created by Bermi Ferrer and other contributors.
Potions of the code and documentation have been ported from Ruby on Rails.

The Akelos Framework is released under the LGPL license.

"Akelos", "Akelos Framework", and the Akelos logo are trademarks of Bermi Labs All rights reserved.

Wiki driven by DokuWiki