views:

344

answers:

1

First, I'm a complete newb to rails - I've been trying to get my feet wet, but ran into some trouble here.

I've followed http://kb.mediatemple.net/questions/279/Ruby+on+Rails+using+Mongrel+Clusters to install rails, everything worked except one of the last steps:

"cp /var/www/vhosts/testapp.mt-example.com/rails/testapp/public/.htaccess /var/www/vhosts/testapp.mt-example.com/rails/testapp/public/.htaccess.old && echo 'ErrorDocument 500 "Application error Rails application failed to start properly"' > /var/www/vhosts/testapp.mt-example.com/rails/testapp/public/.htaccess"

It returns: " cp: cannot stat `/var/www/vhosts/myurl.com/rails/myapp/public/.htaccess': No such file or directory "

When I access the domain, rails seems to work - but when I click "about your application's environment" i get " We're sorry, but something went wrong.

We've been notified about this issue and we'll take a look at it shortly."

I then setup some quick scaffolds just to see what was going on, received the same messages when accessing those pages from the browser.

Thanks in advance for any help!

+1  A: 

Had the exact same problem / error messages just now after carefully following the same media temple howto and figured it out this way:

I checked the status of mongrel and found that it wasn't actually starting:

mongrel_cluster]# /etc/init.d/mongrel_cluster status
Checking all mongrel_clusters...
mongrel_rails cluster::status -C testapp.yml
missing pid_file: /var/run/mongrel_cluster/mongrel.4000.pid
missing mongrel_rails: port 4000 ...

I then followed this lead in the media temple KB for the mongrel logs

http://kb.mediatemple.net/questions/245/View+the+Mongrel+Logs+for+a+Ruby+on+Rails+application

which showed this error message in the logs:

Rails requires RubyGems >= 1.3.2 (you have 1.3.1). Please `gem update --system` and try again.

No problem - I ran the update command it asked for and everything is working now. It looks like media temple needs to update their instructions as everyone who follows it line for line is going to run into this error since it has users install RubyGems 1.3.1 (notifying them now..)

Hope this helps

schnippy