PDA

View Full Version : Ruby on Rails via BH Control Panel



stparris
08-30-2008, 09:43 PM
I don't see anything in the forums or tutorials that reference what is supposed to happen when you create/start a Rails app thru the control panel. It generates a rails app in public_html/<my app>, and I noticed that it updates a mongrel log in public_html/<my app>/log, but the process quickly dies wthout an error.

Is this working? Or should I follow this guide:

http://helpdesk.bluehost.com/kb/index.php?x=&mod_id=2&id=232

It appears to be outdated with the BH control setup.

FYI: I do have a working application that I've uploaded to the folders BH control panel created.

stparris
08-30-2008, 10:11 PM
I found the answer in this thread:

http://www.bluehostforum.com/showthread.php?t=13539&highlight=ruby+rails+control+panel

The control panel setup might work if you have a dedicated ip. I wasted many hours poking around so it would have been helpful to have some explanation in the control panel...

thegodmachine
12-09-2008, 06:04 AM
Thanks for mentioning that. I was wondering the same thing. cPanel provides a way to start/start rails apps.

If anyone knows how to restart a rails app to pick up changes from the command line I'd love to know! :)

genkilab
01-14-2009, 10:25 AM
I'm not so sure the control panel works the way it's supposed to either.
I used it to make a new rails app in ~/rails/<appname>/current.
Then I blew away the directories it created and deployed with capistrano to ~/rails/appname
I checked my ...current/public/.htaccess and dispatch files to make sure they were correct.
I have a subdomain pointed at ~/http_public/<appname> and a link from there to my app.

It runs fast and reliably in production mode, and logs correctly... BUT...

The control panel think always says my app is "Not Running", no matter what I do. I also can't restart it. The tmp/cache dir in my app is empty so BlueHost is caching the production rails stuff somewhere secret. (Probably why you need to comment out config.action_view.cache_template_loading in the prod environment just to get it to run).
If anyone figures how to blow away the cache, let me know.

genkilab
01-14-2009, 10:46 AM
well... just checked again. Apparently I'm using fast-cgi instead of mongrel. Which pretty much explains why the control panel dies a soft death when trying to start a mongrel cluster.

As far as clearing the cache... anyone know how to do that other than waiting for bluehost to do the regular restart thing?