Hey all,
I’m writing a document on installing radiant on dreamhost using
capistrano. I’ve got most everything working, except this recipe
that I call radiant_big_red_button. All it does is call script/
setup_database with the options… but it’s acting goofy. I’m
curious if anyone can spot the best way to solve this issue.
snippet from deploy.rb
desc “Setup basic radiant installation”
task :radiant_big_red_button do
run <<-CMD
WORKINGDIR=pwd
;
cd #{current_path};
./script/setup_database -o -t styled-blog.yml production;
cd $WORKINGDIR;
CMD
end
snippet of error from example.comcap radiant_big_red_button
** [out :: example.com] Creating user ‘admin’ with password
** [out :: example.com] from /usr/lib/ruby/1.8/yaml.rb:129:inopen' ** [out :: example.com] from /usr/lib/ruby/1.8/yaml.rb:129:in
load_file’
** [out :: example.com] from ./script/setup_database:223:in
load_template' ** [out :: example.com] from ./script/setup_database:23:in
run’
** [out :: example.com] from ./script/setup_database:9:in `run’
** [out :: example.com] from ./script/setup_database:297
command finished
I believe the error is coming from @templates_dir not being set
correctly. Relative vs. absolute paths have gotten me this far, but
I really don’t want to start modifying setup_database if I don’t have
to.
snippet from setup_database
def load_environment
announce “Loading #{env} environment” do
require File.join(File.dirname(FILE), ‘…’, ‘config’,
‘environment’)
@templates_dir = File.join(RADIANT_ROOT, ‘db’, ‘templates’)
end
end
Thoughts?
Caylan