Yet another dreamhost question

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:in open' ** [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

Fixed it for the time being.

desc “Setup basic radiant installation”
task :radiant_big_red_button do
run “#{current_path}/script/setup_database -o -t #{current_path}/
db/templates/styled-blog.yml production”;
end

John: Any feeling for 0.5.1 release date?


Caylan

Caylan Van L. wrote:

Fixed it for the time being.

desc “Setup basic radiant installation”
task :radiant_big_red_button do
run “#{current_path}/script/setup_database -o -t
#{current_path}/db/templates/styled-blog.yml production”;
end

John: Any feeling for 0.5.1 release date?

Sometime tomorrow hopefully.


John L.
http://wiseheartdesign.com

Caylan Van L. wrote:

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.

. . .

Thoughts?

When you call setup_database with the -t option the filename must be
relative to the current directory (of the shell) or absolute:

./script/setup_database -o -t /radiant-path/db/templates/styled-blog.yml


John L.
http://wiseheartdesign.com