I'm not really sure what the problem is at the moment, here's what I've done so far:
I created a directory for mephisto, under ~/mephisto
Then svn the source using
svn co http://svn.techno-weenie.net/projects/mephisto/trunk ~/mephisto
I then froze it to edge rails using
rake rails:freeze:edge
I then ran mephisto's custom rake command
rake db:bootstrap RAILS_ENV=production
I ran around the application changing things so that it would suit the production environment:
My database.yml reads
production:
adapter: mysql
database: [username]_mephisto
username: [username]_[username created under cpanel]
password : [password for username created under cpanel]
I've uncommented the line in environment.rb to read
ENV['RAILS_ENV'] ||= 'production'
I've changed around .htaccess to read
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
And commented out
# AddHandler fastcgi-script .fcgi
I've created the symlink for the public_html folder using
[~]# mv ~/public_html ~/public_html_backup
[~]# ln -s ~/mephisto/public ~/public_html
Ok now here's where the problems begin:
I've navigated over to my domain name, and I receive this error
" Mysql::Error in MephistoController#dispatch
#28000Access denied for user 'root'@'localhost' (using password: NO)"
This is a little strange to me, because when I ran the rake db:bootstrap RAILS_ENV=production, it was able to write to the production database with the user/pw settings in database.yml.
This is after I created the symlink to ~/mephisto/public
I thought this might mean that I hadn't started my server yet (do we have to do this to take rails apps to production, I'm used to development where everytime I want to test it I run script/server).
So what happens when I ran "script/server -e production" is it exits with an error
** Starting Mongrel listening at 0.0.0.0:3000
Exiting
/usr/local/lib/ruby/gems/1.8/gems/mongrel-0.3.15/lib/mongrel/tcphack.rb:12:in `initialize_without_backlog': Address already in use - bind(2) (Errno::EADDRINUSE)"
I thought maybe it was because I wasn't running it on the correct port, so I then ran it with the command to set the port (as indicated in the welcome email sent when I signed up to HR)
script/server -d -p 4140 -e production
The server started succesful, but it didn't fix anything, and now I don't know how to stop the process because it's running in the background, so I figured I should stop and ask for some help.
The guides that I've been following are at:
http://www.hostingrails.com/forums/wiki_thread/1
http://mephisto.stikipad.com/help/show/Installing+Mephisto+on+a+shared+host
http://www.mumbleramble.org/install.html
Questions:
1. I'd like to know how to kill the process I started with the script/server -d
2. How come navigating to my domain gives the #28000 error after the symlink is created? Before the symlink, it would load up and show "cgi-bin"; the files that are now located in public_html_backup
3. How to get my deployment back on track
4. I've actually got 2 domains, at the moment at the registrar I've pointed them to the hostingrails nameservers, however only the main one that I signed up with works (ie it shows the error). The other domain I haven't set up as an add-on domain yet. What I want to do is set this mephisto application to work on the "other" domain, so that the main domain I can use to launch an application at a later date.
Thank you very much for any feedback/direction/help, and have a Happy New Year!
Steven