Skip to content
This repository has been archived by the owner on Feb 12, 2018. It is now read-only.

Commit

Permalink
Worked on the README a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
danopia committed Nov 5, 2009
1 parent f542598 commit 62f5bfc
Showing 1 changed file with 33 additions and 24 deletions.
57 changes: 33 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ Ruby on Sails - Sailing the Waves of Google with Ruby!

### Basics
Ruby on Sails isn't really set up for sidespread setups (or even sending to a
friend). You'll notice the wave.danopia.net folder, this is the rails app. The
main provider file, xmpp_component.rb, requires a file from the rails site, so
you'll have to update the paths if you move stuff around.
friend). You'll notice the rails/ folder, this is the rails app. This isn't
supposed to be run by itself - in order for all the features to work, you'll
have to use the RackUp file. The main provider file, xmpp_component.rb,
requires a file from the rails site, so you'll have to update the paths if
you move stuff around.


Setup
Expand All @@ -17,23 +19,24 @@ connect to. To set up Openfire, follow [these directions][g_install].

### Certificates
Sails also [attempts to] sign deltas, so you'll need to create certs for it to
use. It uses "#{domain}.cert" and "#{domain}.key", which is what is given to
you if you follow [Google's instructions][g_certs] to create certs. (I have
included their make-cert.sh utility in the Sails repo.)
use. It uses "#{domain}.cert" and "#{domain}.key" by default, which is what is
given to you if you follow [Google's instructions][g_certs] to create certs.
(I have included their make-cert.sh utility in the Sails repo.) The paths are
setable in the YAML config.

### Dependancies
### Dependencies
You'll need a few gems to run Sails and the provided WebUI, so make sure that
you have RubyGems (and ruby!) installed, and install 'authlogic', 'rails',
and 'sqlite'. You may want to consult `gem list --local` for a list of
installed gems. The sqlite gem probably will want you to install developement
headers/packages for sqlite; on my Ubuntu machine, the dev package is called
'libsqlite3-dev'.
you have RubyGems (and ruby!) installed, and run `sudo gem install authlogic
rails sqlite3-ruby hpricot'. You may want to consult `gem list --local` for a
list of already-installed gems. The sqlite3-ruby gem probably will want you to
install developement headers/packages for sqlite; on my Ubuntu machine, the
dev package was called 'libsqlite3-dev'.

### Configoration
### Configuration
Finally, you'll have to config the XMPP component. Ruby on Sails will try
reading sails.conf, a YAML file, for configuration settings. You'll find XMPP
name, host, port, password, and service name there, plus a few other worthless
things.
reading sails.conf, a YAML file, for configuration settings. It has XMPP domain,
host, port, password, and service name there, plus a few other worthless
things (such as certificate paths).


Running
Expand All @@ -43,7 +46,7 @@ Running
Make sure that you have OpenFire (or some other XMPP server) configed and
_running_. Run the XMPP component like so:

ruby xmpp_component.rb
rake provider:start

If it has some file reading error, then it can't find the certs (TODO: cleaner
error message). If it said the server denied the component, ensure that you
Expand All @@ -53,20 +56,26 @@ bad (gist the output and file a bug report).

### Running the WebUI
The Sails WebUI is built with Ruby on Rails. The Ruby on Sails name is also
stolen from Rails' name. First things first, you need a DB to store user
accounts in. `cd` to wave.danopia.net/ and run `rake db:migrate`. If anything
other than success occurs, scroll down to the Contact Me section.
stolen from Rails' name. The live-update system is built in RackUp and has only
been tested with 'thin'.

The easiest way to run the site in a dev environment is by `cd`ing to
wave.danopia.net/ and running:
First things first, you need a DB to store user accounts (and eventually waves)
in. `cd` to rails/ and run `rake db:migrate`. If anything other than success
occurs, scroll down to the Contact Me section.

./script/server
The easiest way to run the site in a dev environment is by running this from
the main Sails folder (NOT rails/):

rake thin:start

...which should start up a cute little HTTP server, ready for browsing on port
3000. Visit the site. You'll have to register an account - your DB is going to
be a fresh creation, not a copy of the live one from my site. Once that's set
up and running, DRb-error-free, play around in the webui for a bit :P

When you are done, you can stop the thin server with either `rake thin:stop`
or simply `thin stop`.


Contributing
------------
Expand All @@ -83,7 +92,7 @@ Contact me
I idle in #googlewave on FreeNode 24/7 and also on my private network at
irc.eighthbit.net. You can send me GitHub messages or email me at
me.github@danopia.net. I also may read any waves sent to me (my username is
ddanopia).
ddanopia on the public preview, danopia on the sandbox).


[g_install]: http://code.google.com/p/wave-protocol/wiki/Installation
Expand Down

0 comments on commit 62f5bfc

Please sign in to comment.