# Yet another dreamhost question

**URL:** <https://www.ruby-forum.com/t/yet-another-dreamhost-question/99029>\
**Category:** Radiant CMS\
**Created:** [July 19, 2006, 9:49pm UTC](https://www.ruby-forum.com/t/yet-another-dreamhost-question/99029 "2006-07-19T21:49:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Caylan\_Van\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f17d59/32.png) [@Caylan\_Van\_L](https://www.ruby-forum.com/u/Caylan_Van_L)\
**Post date:** [July 19, 2006, 9:49pm UTC](https://www.ruby-forum.com/t/yet-another-dreamhost-question/99029/1 "2006-07-19T21:49:44Z")

</div>

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](http://example.com)] Creating user ‘admin’ with password  
> \*\* [out :: [example.com](http://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](http://example.com)] from ./script/setup\_database:223:in  
> `load_template' ** [out :: example.com] from ./script/setup_database:23:in `run’  
> \*\* [out :: [example.com](http://example.com)] from ./script/setup\_database:9:in `run’  
> \*\* [out :: [example.com](http://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

---

<div class="post-metadata">

**Author:** ![Caylan\_Van\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f17d59/32.png) [@Caylan\_Van\_L](https://www.ruby-forum.com/u/Caylan_Van_L)\
**Post date:** [July 19, 2006, 9:55pm UTC](https://www.ruby-forum.com/t/yet-another-dreamhost-question/99029/2 "2006-07-19T21:55:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Caylan\_Van\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f17d59/32.png) [@Caylan\_Van\_L](https://www.ruby-forum.com/u/Caylan_Van_L)\
**Post date:** [July 19, 2006, 10:40pm UTC](https://www.ruby-forum.com/t/yet-another-dreamhost-question/99029/3 "2006-07-19T22:40:22Z")

</div>

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](http://wiseheartdesign.com)

---

<div class="post-metadata">

**Author:** ![Caylan\_Van\_L](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f17d59/32.png) [@Caylan\_Van\_L](https://www.ruby-forum.com/u/Caylan_Van_L)\
**Post date:** [July 19, 2006, 9:58pm UTC](https://www.ruby-forum.com/t/yet-another-dreamhost-question/99029/4 "2006-07-19T21:58:45Z")

</div>

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](http://wiseheartdesign.com)
