wesabe / mesabe

The private version of Wesabe you can run on your own computer. See the wiki for install instructions.
http://github.com/wesabe/mesabe/wikis
106 stars 14 forks source link

Notes from a Mac OS X installation #19

Open BigJC opened 13 years ago

BigJC commented 13 years ago

I have Mesabe running under OS X 10.6.4 (Snow Leopard) and had to make some changes to the procedure in the Mesabe DIY wiki. Other Mac OS installers may possibly benefit from my experiences.

As I was not familiar with UNIX I got a lot of general help from the tutorials at OSXFAQ http://osxfaq.com/Tutorials/LearningCenter/

The following comments relate to the different sections within Mesabe DIY

Get the Source

OS X users should type $ brew install git

MySQL

For my second attempt to install this software I downloaded the 64 bit DMG Archive from http://www.mysql.com/downloads/mysql/

The procedure was so straightforward that I wished I had chosen this route from the start.

I added /usr/local/mysql-5.1.52-osx10.6-x86_64/bin to the PATH environment variable $ export PATH=$PATH:/usr/local/mysql-5.1.52-osx10.6-x86_64/bin

To check that this has worked type echo $PATH

(It is possible to add the export command to a .profile file which Terminal will execute each time it starts up.)

BRCM

Java, Maven and Rake were already installed.

After following the BRCM installation instructions I typed $ ~/wesabe/brcm-accounts-api $ rake test

I did see a bunch of passing tests, with 1 failure.

Running com.wesabe.api.accounts.resources.tests.AccountResourceTest Tests run: 11, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.07 sec <<< FAILURE!

Hopefully this does not matter.

PFC

As instructed type $ brew install oniguruma

I already had Ruby 1.8.7 but the RubyGems version was 1.3.5. To check version numbers type $ gem env

To upgrade RubyGems type $ sudo gem update --system

We are back on track and can type $ gem install bundler --pre

A blog explaining how to install the mysql gem is now essential reading http://www.tatvartha.com/2010/10/installing-mysql-gem-with-bundler-on-snow-leopard/

The location used for MySQL in my installation meant that I had to change the command to $ bundle config build.mysql --with-mysql-config=/usr/local/mysql-5.1.52-osx10.6-x86_64/bin/mysql_config

To check the path to mysql_config the following should work $ find /usr -iname "*mysql_config"

For the rest of this section follow the standard instructions.

Upload Support

No problems. Python already installed.

Currency Support

My accounts are all in pounds sterling but I guessed I could ignore this section.

Get This Thing Online Already

I found it easier to follow the instructions in the Pre-built Virtual Machine section (Option 2).

To open a second terminal window just ctrl-click on the Terminal icon which you will surely have installed in the dock by now.

As a simple way to upload my snapshot I copied the file I had downloaded from Wesabe into the ~/wesabe/pfc directory and then ~/path/to/snapshot.zip was just the filename.

While carrying out filer operations I created a tmp directory inside ~/wesabe/pfc/private/wesabe/uploads to avoid the bug described in issue 11 in PFC issues.

willyd commented 13 years ago

First I'd like to say that I found your notes very helpful to get wesabe working on my macbook pro.

However I had problems without some parts of the installation process I would like to share.

I had problems with libxml. I had installed a version of this library using macports and it was installed only as a i386 library. Rebuilding this library as a universal binary solved the problem.

Next was the mysql install. I installed a binary version but did not install the startup items and the preference pane components, this was my first mistake. Also I installed the mysql gem with bundler but even when the archflags environment variable was set to -arch x86_64 the mysql gem would build as i386. I had to install it with the command

sudo env ARCHFLAGS="-arch x86_64" bundle install

and making the config changes suggested in the blob post mentioned above. After that everything went smoothly. I started the mysql server using the preference pane item and followed the rest of the instructions and got mesabe to work.

Hope this helps anyone else.

ghost commented 13 years ago

Thanks to both of you for the notes. I found I had to do one more thing to get this to work.

Despite getting everything installed with the correct architecture, I was still getting the uninitialized constant Mysql::Error message when running rake db:setup. After searching the Internet, the solution that fixed this was to update my dynamic library path:

export DYLD_LIBRARY_PATH="/usr/local/mysql/lib:$DYLD_LIBRARY_PATH"

It doesn't seem like this should be necessary, but it allowed the rake utilities to find the mysql libraries. It is also necessary to set this when the pfc server is run.

FWIW, my system is a Core 2 Duo iMac that shipped with 10.5 (Leopard) that I upgraded to 10.6 (Snow Leopard).