# This example is available on Github at https://github.com/chip/invoicethat-admin
# For simplicity's sake, I put this into app.rb# Root directory of my Rails app
RAILS_ROOT = '/Users/deploy/Sites/rails_invoice'
# Setup load_paths for ActiveSupport
require 'active_support'
relative_load_paths = %w(app/models)
::ActiveSupport::Dependencies.load_paths = relative_load_paths.map { |path|
File.expand_path(path, RAILS_ROOT)
}
# Connect to the Rails app database
require 'active_record'
config_path = File.expand_path('config/database.yml', RAILS_ROOT)
all_envs_config = YAML.load(File.read(config_path))
config = all_envs_config[ENV['RACK_ENV']]
::ActiveRecord::Base.establish_connection(config)
sudo postsuper -d ALL
I guess it always helps to READ the man pages. ;)
sudo postconf -d | grep ^mail_version
mail_version = 2.3.8
cat /etc/issue
Debian GNU/Linux 4.0
sudo postconf -n | grep ^alias
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
postmap -q root hash:/etc/aliases
root: you@domain.com
mailer-daemon: postmaster
postmaster: root
sudo newaliases
sudo postfix reload
sudo postmap -q root /etc/aliases
sudo tail -f /var/log/mail.log
git svn clone -t '' -b '' -T '' svn+ssh://host.tld/path/to/repo/Upon running this command, I did see errors stating that I hadn't specified branches or tags properly, so it's possible that those flags are superfluous in my case, but in any event the -T '' was essential to a successful import.In the process of finding the magic flag for importing, I found http://jo.irisson.free.fr/?p=64 to be particularly descriptive and helpful in my understanding of the import process. However, git-svnimport has been deprecated, so I used git-svn instead.
sudo port outdatedI used the results of this command to cherry pick what I needed to upgrade. Apparently, all I needed to do in my situation was upgrade apr, but I went ahead and upgraded a number of other ports for good measure, following this procedure:
sudo port selfupdateAfter all of this, I restarted apache.I found http://www.nabble.com/Issue-installing-Apache-2-on-Leopard-td16426260.html to be especially helpful during the process, but mainly was happy to discover the "outdated" command. I hope you find this useful, too.
sudo port install db44 +darwin_8
sudo port outdated
sudo port upgrade apr bzip2 gcc_select libevent libpcap \
libxml2 memcached pcre
sudo port upgrade apache2
/opt/local/var/macports/distfiles/More specifically, I did this:sudo cp ~/Desktop/rsync-3.0.4.tar.gz /opt/local/var/macports/distfiles/rsync/ As a precautionary measure, it is best to run md5 against the downloaded file to be sure that it matches the checksum listed in the Portfile. 3. Edit the Portfile and start the process againNow I need to find the Portfile. It varies for each dependency, but on my laptop I always use this as a base directory:
/opt/local/var/macports/sources/rsync.macports.org/release/ports/However, each dependency is not always neatly under this directory, as in the case of rsync, so I had to do a little searching, as follows:chip-castles-powerbook-g4-17:/opt/local/var/macports/sources/rsync.macports.org/release/ports deploy$ find . -name "rsync*"
./net/rsyncSo I cd into net/rsync and edit the Portfile by adding a "fetch {}" directive to override this stage in the port installation process. I found that it worked successfully when I put it as the first option with braces, generally found after the initial variables are set. In this example, it is between config.cflags and pre-configure directives.Here's my rsync Portfile:# $Id: Portfile 39822 2008-09-06 22:37:30Z simon@macports.org $PortSystem 1.0name rsync
./net/rsync/files/rsyncd.conf.example
./net/rsync-devel
./net/rsync-lart