Skip to content
This repository has been archived by the owner on May 8, 2018. It is now read-only.
eventualbuddha edited this page Aug 13, 2010 · 94 revisions

Virtual Machine

If you’d like to skip the installation process (most of it, anyway), instructions for getting a virtual machine with Wesabe pre-installed into Ubuntu are in Mesabe Virtual Machine. Otherwise, press on.

Wesabe Install

You need Mac OS X or Linux (Ubuntu good, but others will work). On Mac OS X you’ll want to install homebrew. It will keep you sane. On Linux (assuming Ubuntu, translate yourself as necessary) you already have good package managers.

WARNING: This guide is missing things and may be unclear. It assumes you know quite a bit. I’d like to make it easier to follow, so if you encounter something that isn’t clear or is missing altogether, create an issue in this project or find eventualbuddha, indirect, or bgreenlee in #openwesabe on Freenode and tell us what is wrong and, hopefully, how you fixed it.

If you encounter what you believe to be a bug, please file an issue with the appropriate project (most likely you’ll want pfc’s issues page).

New to Linux

For those who are new to Linux in the instructions below there will be “script boxes” for example:
~/wesabe $ git clone http://github.com/wesabe/pfc.git
the $ dollar symbol and everything preceding, you don’t need to type; this is Linux’s way of telling you who you are logged in as, and where you are in the file structure.
So in reality the terminal will say [user]at[machinename]:~/wesabe$ and you’ll type git clone http://github.com/wesabe/pfc.git as the script box above suggests.

Get the Source

Requires

  • Git $ sudo apt-get install git-core

Create a directory for the code to live. This should be a permanent place for them.

~ $ mkdir ~/wesabe
~ $ cd ~/wesabe

Use git to clone pfc and brcm-accounts-api.

~/wesabe $ git clone http://github.com/wesabe/pfc.git
~/wesabe $ git clone http://github.com/wesabe/brcm-accounts-api.git

If the git clone command gives you an error (for example, “Unable to get pack file”) try using git://github.com/wesabe/pfc.git or git://github.com/wesabe/brcm-accounts-api.git as the URL instead.

MySQL

Install MySQL 5. If you’re on OS X you can use brew:

$ brew install mysql

Or use aptitude if you’re on Ubuntu:

$ sudo aptitude install mysql-server-5.1

Or install a binary package from mysql.com.

Create two databases:

$ mysql -u root -p
> create database pfc_development;
> create database pfc_test;
> exit

Set up whatever access restrictions you want.

BRCM

Requires:

  • Java 6 (not the runtime) $ sudo apt-get install openjdk-6-jdk
  • Maven 2 (291 MB) $ sudo apt-get install maven2
  • Rake $ sudo apt-get install rake

Change directory to brcm-accounts-api.

Create a development.properties file to let BRCM connect to your newly-created database:
To create a new document type vi development.properties you’ll want to add the following information:

hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
hibernate.connection.username=root
hibernate.connection.password=
hibernate.connection.url=jdbc:mysql://localhost:3306/pfc_development
hibernate.generate_statistics=true

Modify it to fit your database configuration.

To exit the file type :wq

In your wesabe directory, create a mvn directory, and copy shore-0.2-SNAPSHOT.jar, shore-0.2-SNAPSHOT.pom, xmlson-1.5.2.jar, and xmlson-1.5.2.pom to that directory. Then cd to the mvn directory and install those files with Maven 2 by running:

$ mvn install:install-file -Dfile=xmlson-1.5.2.jar -DpomFile=xmlson-1.5.2.pom
$ mvn install:install-file -Dfile=shore-0.2-SNAPSHOT.jar -DpomFile=shore-0.2-SNAPSHOT.pom

Maven will copy them to the appropriate places as needed.

Now attempt to run BRCM’s tests from the brcm-accounts-api directory. This will pull down a lot of software from the internet:

~/wesabe/brcm-accounts-api $ rake test

If all’s well, you’ll see a bunch of passing tests at the end.

PFC

Requires:

  • Ruby 1.8.7 $ sudo apt-get install ruby-full
  • Bundler 1.0.x
  • Build tools for your platform (e.g. Xcode/gcc)

On Mac OS X you should already have Ruby 1.8.7, and you’ll need Xcode installed, then use homebrew to install oniguruma:

$ brew install oniguruma

On Ubuntu you’ll want to install stuff via aptitude

$ sudo aptitude install g++ libruby1.8 libopenssl-ruby libmysqlclient-dev libxslt1-dev libxml2-dev libonig-dev ruby1.8-dev

If you are using Ubuntu/Debian(Lenny), you will want to manually install RubyGems as you need version 1.3.6+ to install Bundler while the Debian repositories maintain v1.3.5. Follow these steps to do so:

$ cd /tmp
$ wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
$ tar zxf rubygems-1.3.7.tgz
$ cd rubygems-1.3.7
$ sudo ruby setup.rb
$ sudo ln -sfv /usr/bin/gem1.8 /usr/bin/gem

With rubygems 1.3.7 installed, get the bundler gem by

$ sudo gem install bundler --pre

Change directory to pfc. Install the required gems:

$ bundle install

NOTE: You may need to run bundle install with this environment variable if your MySQL version is 64-bit:

$ export ARCHFLAGS="-arch x86_64"
$ bundle install

Those running OSX Snow Leopard, for example, will have to do this otherwise you will encounter a strange ‘unitialized constant Mysql::Error’ when running rake db:setup.

Copy all files named config/*.example.yml to just config/*.yml. Modify config/database.yml as needed. Now set up the database:

$ rake db:setup

This will take a minute or two and will import some necessary data.

Upload Support

Requires:

  • Python 2.6+ should already be installed with Ubuntu Server 10.04

At the moment only manual uploading is available, and to support that you’ll need to clone fixofx. Put it at the same level as pfc and brcm-accounts-api.

$ cd /home/[username]/wesabe
$ git clone git://github.com/wesabe/fixofx.git

Get This Thing Online Already

$ cd /home/[username]/wesabe/pfc
$ script/rails server
$ cd /home/[username]/wesabe/brcm-accounts-api
$ script/server

Go to http://localhost:3000/ in your browser. Done!

If you have a snapshot to restore, do not create an account with the same email address that you had at wesabe.com. But if you missed this warning and created the account in the rush of seeing a successful installation, you can use a MySQL management application like PHPMyAdmin to empty the user tables.

A NOTE ABOUT PORTS: PFC will run on port 3000 by default. If that doesn’t work for you, add -p 4000 (or whatever port you want) to the rails server command above. Similarly, BRCM will run on port 8080. If that doesn’t work for you then change pfc/config/services.yml’s development entry for BRCM to use a different port, say 8090, then add -p 8090 when you run BRCM.

Signing up

Now, go ahead and sign up for a new account on your very own Wesabe! After you’ve signed up, you’ll be able to upload your bank statements and chart your finances using the tools that were available in the Accounts tab at wesabe.com.

Import wesabe.com snapshot (optional)

If you had an account at wesabe.com and downloaded a snapshot before it shut down on 1 August 2010, you can import that snapshot.

Run this command in the pfc directory:

$ bundle exec thor snapshot:import ~/path/to/snapshot.zip

Then, go to http://localhost:3000/ again and log in with the same email address you used to log into wesabe.com, but with the password changeme!.

Clone this wiki locally