-
Notifications
You must be signed in to change notification settings - Fork 14
Home
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).
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.
If you get an error using git
you may need to install it $ sudo apt-get install git-core
~/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.
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;
Set up whatever access restrictions you want.
Requires:
- Java 6 (not the runtime)
$ sudo apt-get install openjdk-6-jdk
- Maven 2 (291 MB)
$ sudo apt-get install maven2
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:
You may need to install rake sudo apt-get install rake
$ rake test
If all’s well, you’ll see a bunch of passing tests at the end.
Requires:
- Ruby 1.8.7
$ sudo apt-get install ruby-full
- Bundler 0.9.x
- Build tools for your platform (e.g. Xcode/gcc)
You’ll need access to the root, set the password, to enter root $ su
$ sudo passwd root
$ su
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
$ aptitude install g++ libruby1.8 libopenssl-ruby libmyqslclient-dev libxslt-dev libxml2-dev libonig-dev ruby1.8-dev
If you are using Ubuntu/Debian, 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
Change directory to pfc
. Download and install the libcharguess gem manually:
$ cd ~/wesabe/pfc
$ wget http://dl.dropbox.com/u/40652/libcharguess-1.0.gem
$ sudo gem install libcharguess-1.0.gem
NOTE: If you are having problems getting libcharguess to compile on your platform, you can probably just leave it out. It’s only used in one place in the codebase, and is only needed because a couple banks were providing statements that were in a different character encoding than was indicated. Chances are your bank statements don’t have this problem, so you can comment it out.
Install the rest of 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.
Requires:
- Python 2.6+
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 ~/wesabe
$ git clone git://github.com/wesabe/fixofx.git
In pfc
:
$ script/rails server
In brcm-accounts-api
:
$ rake run
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 use this to run BRCM: rake run PORT=8090
.
If you had an account at wesabe.com you should have used a snapshot to transfer your data over.
Requires:
- Thor (install with
gem install thor
)
Now, in pfc
:
$ thor snapshot:import ~/path/to/snapshot.zip
Now, 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!
.
As of 1 August 2010 the Wesabe Accounts tab is offline, so go ahead and sign up for a new account on your very own Wesabe!