# Newbie questions for publish the site

**URL:** <https://www.ruby-forum.com/t/newbie-questions-for-publish-the-site/127565>\
**Category:** Rails\
**Created:** [January 30, 2008, 12:52pm UTC](https://www.ruby-forum.com/t/newbie-questions-for-publish-the-site/127565 "2008-01-30T12:52:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmcfab](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/838e76/32.png) [@cmcfab](https://www.ruby-forum.com/u/cmcfab)\
**Post date:** [January 30, 2008, 12:52pm UTC](https://www.ruby-forum.com/t/newbie-questions-for-publish-the-site/127565/1 "2008-01-30T12:52:58Z")

</div>

I’m a newbie and I have many about how to publish my website made in  
Ruby.

I developed a simple site in Ruby with MySQL for learning, in  
development environment work fine, now I will publish in my site hosted  
on HostGator, my site work in Linux with Apache web server with support  
for Ruby on Rails, I have some questions for publish:

1. I need upload all created folders (app, components, config, db, doc,  
lib, log, public, script, test, tmp, vendor)?

2. How Ruby will know what database will be used ‘development’ or  
‘production’?

I uploaded my entire website folder to a folder ‘test’ in my website and  
when I access /mydomain.com/test/public I get the error below:

Application error  
Rails application failed to start properly"

---

<div class="post-metadata">

**Author:** ![cmcfab](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/838e76/32.png) [@cmcfab](https://www.ruby-forum.com/u/cmcfab)\
**Post date:** [January 30, 2008, 9:36pm UTC](https://www.ruby-forum.com/t/newbie-questions-for-publish-the-site/127565/2 "2008-01-30T21:36:05Z")

</div>

1. Yes upload all created folders.

2. Because in your database.yml file you should tell it which database  
is which. Then you can set “development” and “production” in  
config.rb.  
A. Ensure that dispatch.cgi/.fcgi/.rb are all 755 (CHMOD 775,  
properties-\>executable, etc)  
B. If that doesn’t work, post the apache error logs.

3. 

> 1. I need upload all created folders (app, components, config,  
> db, doc,

---

<div class="post-metadata">

**Author:** ![cmcfab](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/838e76/32.png) [@cmcfab](https://www.ruby-forum.com/u/cmcfab)\
**Post date:** [January 31, 2008, 11:25pm UTC](https://www.ruby-forum.com/t/newbie-questions-for-publish-the-site/127565/3 "2008-01-31T23:25:04Z")

</div>

kopf1988,

1. I change dispatch.cgi/.fcgi/.rb to 755
2. I change to ENV[‘RAILS\_ENV’] ||= ‘production’, in environment.rb
3. Don’t work, below the apache error log:

Premature end of script headers:  
/home/myuser/public\_html/rubytest/public/dispatch.cgi
