Hack hack hack...

An open journal-- some of it written for you, but most of it is for me.

Diaspora- Day 1

What is diaspora?

Now I need to decide what DB I’m going to use. I poked around and found MariaDB, but Avi suggested I go with Percona, MySQL or Postgres. Postgres seems to have the best intergration with Heroku so I’ll go with that…

I already have psql version 9.0.5. This isn’t the newest version… TODO

Open SSL The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a full-strength general purpose cryptography library managed by a worldwide community of volunteers that use the Internet to communicate, plan, and develop the OpenSSL toolkit and its related documentation. - I’m not really sure what all that means… so I checked out Here is what I found: - TLS and its predecessor SSL make significant use of certificate authorities. - The browser then uses the public key to encrypt a randomly selected symmetric key. Public-key encryption takes a lot of computing, so most systems use a combination of public-key and symmetric key encryption. When two computers initiate a secure session, one computer creates a symmetric key and sends it to the other computer using public-key encryption. The two computers can then communicate using symmetric-key encryption. Once the session is finished, each computer discards the symmetric key used for that session. Any additional sessions require that a new symmetric key be created, and the process is repeated. I can circle back to learn more here. TODO

I also have openSSL installed, but I’ll update through

brew install openssl

This downloaded the package, but didn’t update the version that I currently have. It stil shows:

♕ openssl version
OpenSSL 0.9.8r 8 Feb 2011

That’s not great. Well I can’t fix it now… another TODO

cURL groks URLs http://curl.haxx.se/ curl is a command line tool for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, kerberos…), file transfer resume, proxy tunneling and a busload of other useful tricks. - To grok is to intimately and completely share the same reality or line of thinking with another physical or conceptual entity. - There is a tutorial http://curl.haxx.se/libcurl/c/libcurl-tutorial.html. this however mostly focuses on C so I’m not even close to understanding it. - There is another intro here that appears to be more my speed. - also there is a video - don’t know what any of this means… but I do have it installed. Another TODO

imagemagick is next:

brew install imagemagick

That was easy…

Redis need redis as well. Redis, known as a key value store or document store, is pretty much just a hash. “In its outer layer, the Redis data model is a dictionary where keys are mapped to values.” That sounds like a hash to me. Anyways…

brew install redis

There is a try redis tutorial. Alright, now let’s get down to diaspora.

So I cloned the diaspora repo and then tried to cd into the folder

♕ cd diaspora
= NOTICE                                                                           =
= RVM has encountered a new or modified .rvmrc file in the current directory       =
= This is a shell script and therefore may contain any shell commands.             =
=                                                                                  =
= Examine the contents of this file carefully to be sure the contents are          =
= safe before trusting it! ( Choose v[iew] below to view the contents )            =
Do you wish to trust this .rvmrc file? (/Users/Ajonas/diaspora/.rvmrc)
y[es], n[o], v[iew], c[ancel]> y
ruby-1.9.3-p125 is not installed.
To install do: 'rvm install ruby-1.9.3-p125'
ruby-1.9.3-p125 is not installed.
Retrieving rubygems-1.8.17
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  246k  100  246k    0     0   453k      0 --:--:-- --:--:-- --:--:-- 1401k
Extracting rubygems-1.8.17 ...
Removing old Rubygems files...
Installing rubygems-1.8.17 for ruby-1.9.3-p125 ...
Error running 'GEM_PATH="/Users/Ajonas/.rvm/gems/ruby-1.9.3-p194:/Users/Ajonas/.rvm/gems/ruby-1.9.3-p194@global:/Users/Ajonas/.rvm/gems/ruby-1.9.3-p194:/Users/Ajonas/.rvm/gems/ruby-1.9.3-p194@global" GEM_HOME="/Users/Ajonas/.rvm/gems/ruby-1.9.3-p194" "/Users/Ajonas/.rvm/rubies/ruby-1.9.3-p125/bin/ruby" "/Users/Ajonas/.rvm/src/rubygems-1.8.17/setup.rb"', please read /Users/Ajonas/.rvm/log/ruby-1.9.3-p125/rubygems.install.log
Installation of rubygems did not complete successfully.

OK well just follow the bouncing ball right?

[14:32:19] (master) diaspora
♕ rvm install ruby-1.9.3-p125
Already installed ruby-1.9.3-p125.
To reinstall use:

    rvm reinstall ruby-1.9.3-p125

Not good. I looked at the install log but it didn’t provide much help. So after a google search I found this, which suggests it is the .gemrc file. So now I’m in over my head…

So Avi to the rescue. I reinstalled patch 125 with:

rvm reinstall ruby-1.9.3-p125

That sucks I was so hung up on this.

So I bundled again after removing the mysql gem from the gem file since I’m using postgreSQL.

It bundled properly but I can’t get thin to boot…

P.S. ??Should I include a sym link?