Posts [ 10 ]

Topic: hostmonster

Hi Guys,Does anyone in here run their rails app on hostmonster? if so how did you get it up and running? I've try to follow the instruction on their help section and still couldnt get it up and running. Stuck on the Passenger page error, with this error

Re: hostmonster

Hello, I run many rails apps in hostmonster with fastCGI so I can give some instructions.

1) First of all you need to create your new addon domain from cPanel. This will create a folder in the public_html folder which you need to change it, you should link it to your public folder of your rails app. To do this you need ssh access, so you login with ssh and you type:cd ~/public_html/rm -r folder_of_your_addon_domain ln -s $HOME/rails/name_of_your_app/public $HOME/public_html/folder_of_your_addon_domain

Also a tip when your rails app is up and running with fastCGI, if you are in production mode, the changes you made won't happen immediately, you need to restart your app, so to do this you need to login with ssh access and type in killall dispatch.fcgi

2) Second you need the dispatchers. To get them you need to type rails test_app_just_to_get_the_dispatchers -D with ssh as far as I remembered (the dispatchers will be in the public directory of your new test rails app). This will give you 4 files (dispatch.cgi, dispatch.fcgi, dispatch.rb, .htaccess). Copy all of them and paste them into the public folder of your normal rails app. IMPORTANT: Change to 755 the privileges of this file otherwise it won't work! I have forgotten this one many times in the past and I couldn't figured out why my rails app isn't running. I am changing them with my FTP program (filezilla), right click the file and it is the last option (you can do it also with ssh).

3) Third, last and most important step for hostmonster specific, open your config/environment.rb file of your rails app and write on top of all, this one:ENV['GEM_PATH'] = '/home/the_name_of_your_login_in_ssh/ruby/gems:/usr/lib64/ruby/gems/1.8', I also put this RAILS_ENV = 'production' to run it in production mode and I comment the rails version like this #RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION, for some reason I remember it didn't worked when it was uncomment.

There are many guides on the internet for fastCGI and how to deploy a rails app, this one is for hostmonster and is working date: 4 April 2010, the last step is important to set the gem folder of your rails app and is hostmonster specific. The other steps are for every fastCGI deploy on shared hosting.

Re: hostmonster

When you create your first rails app, the directories are laid out for you. ... are important – it lets rails applications “find their parts” easily, .... You got it — Ruby needs to be installed to run the various files ...

Re: hostmonster

then when I do killall dispatch.fcgii get thisdispatch.fcgi: no process killed

After all that I still have the same error as before.stuck on the passenger page when I try to go to my main domain site. www.my_app.com

Ruby on Rails application could not be startedThese are the possible causes:There may be a syntax error in the application's code. Please check for such errors and fix them.A required library may not installed. Please install all libraries that this application requires.The application may not be properly configured. Please check whether all configuration files are written correctly, fix any incorrect configurations, and restart this application.A service that the application relies on (such as the database server or the Ferret search engine server) may not have been started. Please start that service.Further information about the error may have been written to the application's log file. Please check it in order to analyse the problem.Error message:No such file or directory - config/environment.rbException class:-Errno::ENOENT

Re: hostmonster

Hey Michael,

I'm in the middle of trying to get my Rails app working on Hostmonster. I'm stuck with Rails 2 server. I updated to Rails 3 but no one at Hostmonster can tell me how to run that version instead of rails 2.

As for your situation...

I'm guessing you uploaded your files to the wrong place.The files go into the ~/rails_apps/YOUR_APP_NAME folder.

Did you upload them to ~/public_html/YOUR_APP_NAME ?-or-Did you upload them to ~/rails_apps/YOUR_APP_NAME/public?

Also, I only uploaded the app directory & public directory & the files for the config directory.Your error looks simple, as in, the environment.rb is not in the config folder <--- at least not where the server thinks it should be.

Re: hostmonster

I'm in the middle of trying to get my Rails app working on Hostmonster. I'm stuck with Rails 2 server. I updated to Rails 3 but no one at Hostmonster can tell me how to run that version instead of rails 2.