Welcome Guest | Login

having some trouble deploying mephisto

Hi,

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/1http://mephisto.stikipad.com/help/show/Installing+Mephisto+on+a+shared+hosthttp://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

2006-12-31 04:50 AM

Hi there -

First, if it started a mongrel process for you (look to see if there is a mongrel.pid in your ~/mephisto/log dir) then you can run [~/mephisto]# mongrel_rails stop

Second, don't run script/server - use fastcgi

Third, you'll want to follow this tutorial for learning how to navigate multiple domains/apps.  Essentially, create all your apps in your root and then work the magic with symlinks to make sure the documentroot for the domain (usualy in ~/public_html/somefolder) points to your apps' public folder.  

Fourth, I'm assuming you ran rake after setting up the database.yml?  If not you may need to run rake again.  Are you certain that you database.yml only contains that text you mentioned....I'm not sure why your app is trying to connect as root then - you may want to search around and see if mephisto is storing mysql login info....this may have occurred if you ran rake before editing the database.yml file.

Cheers,

~William

2006-12-31 05:00 AM

you dont need tzinfo? i followed this http://blog.matharvard.com/2006/11/17/installing-mephisto
and the tutorial here and it works for me.

2006-12-31 10:43 AM

Nwahh - that's just a timezone lib - glad its working for you!

2006-12-31 03:03 PM

Hey,

Thanks for the advice, it's all working fine now. You're right, I must have left some mysql info in there, I deleted the directory and started again. It's all working great now :)

2007-01-01 03:19 PM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.