--------------enig910F2905F7F87BF5FE066876
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Intransition wrote:
> * Don't mess with the $LOAD_PATH. PERIOD.
> * Use relative lookup only when you must, eg. using bundled HTML
> templates.
> * Any relative paths you do use must remain within the confines of
> their main directory (eg. lib/)
> * Don't use a relative lookup for any ,rb or .so/.dll loading. PERIOD.
> * Oh, and it should never need to necessary to require 'rubygems'.
>
>   
Ok, I just finished "packaging"[1] my first app, and the only way I
could find that described how to do it, including the pickaxe book (for
ruby 1.9), breaks all but the last of those rules.

Care to enlighten me?

I have a structure of:

App
 |----> bin -> app.rb
 |----> initdb.rb
 |----> lib
           |----> models -> *.rb
           |----> views -> *.rb
           |----> controllers -> *.rb
 |----> config -> database.yaml
 |----> db -> *.sqlite

I'm using wxRuby for the gui, ActiveRecord for the DB access, and
obviously, sqlite for the db.

How do I :

1) Make it so that I can call ruby <path to bin>/app.rb from anywhere in
the filesystem and have my app work?
2) Make 1) true for Linux, Windows and MacOSX?

Regards

Anthony


[1] because it isn't actually packaged yet, just internally consistent....


--------------enig910F2905F7F87BF5FE066876
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkrVw+kACgkQtUxufNRmXkGlcwCgioXzSWZOCQPW9NwzwxbR/Gfl
4YgAoM/0Sm6k196JVk0tyBZOz3XDCBAL
i
-----END PGP SIGNATURE-----

--------------enig910F2905F7F87BF5FE066876--