# Getting edge rails working on bluehost

**URL:** <https://www.ruby-forum.com/t/getting-edge-rails-working-on-bluehost/71752>\
**Category:** Rails\
**Created:** [October 11, 2006, 8:39am UTC](https://www.ruby-forum.com/t/getting-edge-rails-working-on-bluehost/71752 "2006-10-11T08:39:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/4af34b/32.png) [@adam](https://www.ruby-forum.com/u/adam)\
**Post date:** [October 11, 2006, 8:39am UTC](https://www.ruby-forum.com/t/getting-edge-rails-working-on-bluehost/71752/1 "2006-10-11T08:39:23Z")

</div>

Ive done the following, which has worked in the past when using gem  
rails:

1. alter database.yml to reflect database settings  
development:  
adapter: mysql  
database: xxx  
username: xxx  
password: xxx  
host: localhost

2. change the ruby link in the first line of dispatch.cgi and  
dispatch.fcgi to reflect the server location:  
from #!c:\ruby\bin  
to #!/usr/bin/ruby

I test it and it fails. My gem rails app works fine with these changes.  
gem rails app setup based on the bluehost tutorial:  
[http://helpdesk.bluehost.com/kb/index.php?x=&mod\_id=2&root=41&id=232](http://helpdesk.bluehost.com/kb/index.php?x=&mod_id=2&root=41&id=232)

I was under the impression that rails looks in vendor/rails first then  
looks to the system gem install.

I checked out the dispatch.cgi file for relevant settings and found the  
following. It appears to be pointing to the environment file for finding  
the rails root ?

Im out of my depth here and would appreciate some direction with this  
deployment.

dispatch.cgi----------------  
#!/usr/bin/ruby

require File.dirname( **FILE** ) + “/…/config/environment” unless  
defined?(RAILS\_ROOT)

# If you’re using RubyGems and mod\_ruby, this require should be changed

to an absolute path one, like:

# “/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher” –

otherwise performance is severely impaired  
require “dispatcher”

ADDITIONAL\_LOAD\_PATHS.reverse.each { |dir| $:.unshift(dir) if  
File.directory?(dir) } if defined?(Apache::RubyRun)  
Dispatcher.dispatch

environment.rb---------------

require File.join(File.dirname( **FILE** ), ‘boot’)

---

<div class="post-metadata">

**Author:** ![adam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/4af34b/32.png) [@adam](https://www.ruby-forum.com/u/adam)\
**Post date:** [October 11, 2006, 11:03pm UTC](https://www.ruby-forum.com/t/getting-edge-rails-working-on-bluehost/71752/2 "2006-10-11T23:03:58Z")

</div>

man this is frustrating, i cant find any information. It looks like it  
should just work with vendor/rails by default…
