Installing Mephisto with Capistrano on DreamHost
First of all, let me state that I'm no expert on these matters, but I have now got a successful install up and running using Capistrano on DreamHost. It wasn't all that simple, at least to a novice like me, but maybe my notes can help someone else who is struggling with this.
These are the steps I went through to get it working:
1. Set up your domain correctly through DreamHost panel by entering your web directory not as the usual yourdomain.com/public, but as the capistrano required yourdomain.com/current/public
2. The new DNS will propagate around their system and once thats done you need to delete the newly created directories under yourdomain.com so that capistrano can set them up properly.
3. Check out a copy of the trunk or branch you are after of Mephisto from the SVN repository in the root of your new domain /home/youruser/yourdomain.com
4. Set it up as you usually would with Mephisto, configure the database.yml file etc
5. I needed to install Capistrano on my DreamHost account, and if you haven't done so you may need to follow the instructions in the dreamhost wiki for local user installs of gems: http://wiki.dreamhost.com/index.php/Ruby_on_Rails#Using_Gems_Installed_i...
6. To install Capistrano you can then issue the command: gem install capistrano
7. Next you'll activate Capistrano for your mephisto folder by typing: cap --apply-to .
8. Now edit the config/deploy.rb file to suit. I needed to add a bunch of stuff and alter other bits. I've attached a link to my deploy.rb file below: http://tancredi.co.uk/assets/2006/10/19/deploy.rb
9. Make sure you edit all the paths and names to correctly point to your folders.
10. Fire off the following command to start setting up the directories with capistrano: rake remote:exec ACTION=setup
11. Its important with the current version of Mephisto to change one line in the config/environment.rb file. Change it from *config.load_paths...* to *config.autoload_paths...*
11. If all goes well you can: rake deploy
12. Now setup your database as usual and away you go!
The main thing I noticed in my install was to set up a decent set of commands to symlink to the shared folders and also to copy over some of the files that I had customised like my database.yml, dispatch.rb, .htaccess and dispatch.fcgi
You may also need to install the gem tzinfo in your current mephisto install.
I'm sure there are lots of errors in my steps above, they are all from memory so you may need to do some of your own research as you go. Here are my resources:
http://mephistoblog.com/docs/setup
http://nubyonrails.com/pages/shovel_dreamhost
https://support.railsmachine.com/index.php?pg=kb.page&id=13
http://mephistoblog.com/2006/8/8/installing-mephisto-without-required-gems
http://wiki.dreamhost.com/index.php/Capistrano
Good luck!
3 comments
Jump to comment form | comments rssComments
Hey,
I’m trying to install mephisto on dh. Everything is ok, but Admin-panel… It doesn’t get the css file! Technoweene told me to ask support for help, but they answered they can’t help me. Any ideas?
Nevermind that last comment. Shortly after I typed it I managed to find the cap executable in ~/.gems/bin. Once I added that to my PATH in .bash_profile everything is rockin’! Great info though.
I’m curious as to how you got Capistrano installed on DH. I’ve been trying and it says it’s installed [gem list –local] but cap -h gets “cap: command not found”.