# Setting up remote rails

**URL:** <https://www.ruby-forum.com/t/setting-up-remote-rails/160120>\
**Category:** Rails\
**Created:** [February 11, 2009, 10:52pm UTC](https://www.ruby-forum.com/t/setting-up-remote-rails/160120 "2009-02-11T22:52:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![The\_Dro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/85e7bf/32.png) [@The\_Dro](https://www.ruby-forum.com/u/The_Dro)\
**Post date:** [February 11, 2009, 10:52pm UTC](https://www.ruby-forum.com/t/setting-up-remote-rails/160120/1 "2009-02-11T22:52:31Z")

</div>

I’ve got a remote machine on my network which has Ubuntu as the OS. I  
run my testserver on it with all my current PHP sites. All I have to  
type on my main Vista Machine as the URL is “[http://testserver](http://testserver)” and it  
takes me to the index page i’ve created with links to all my sites on  
that remote Ubuntu machine.

My question is:  
I’ve setup RoR on that machine, but when I type testserver:3000 it  
wont access that page. On the machine itself, I am able to see my RoR  
project, but not on my main machine. I’m even able to SSH into the  
testserver to work on the project files. How do I go about setting  
that up?

My second Question is, Where are the config files to tell RoR to use  
the MySQL database I currently have setup on the testserver that  
phpmyadmin is also using? I have edited the database.yml file to  
include the correct login information and the mysql adapter but it’s  
still not connecting properly to the database. Is there a certain file  
I can setup the paths in for my MySQL db?

thanks in advance for your assistance,  
-dro

---

<div class="post-metadata">

**Author:** ![The\_Dro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/85e7bf/32.png) [@The\_Dro](https://www.ruby-forum.com/u/The_Dro)\
**Post date:** [February 11, 2009, 10:54pm UTC](https://www.ruby-forum.com/t/setting-up-remote-rails/160120/2 "2009-02-11T22:54:18Z")

</div>

Have you installed the MySQL gem?

---

<div class="post-metadata">

**Author:** ![The\_Dro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/85e7bf/32.png) [@The\_Dro](https://www.ruby-forum.com/u/The_Dro)\
**Post date:** [February 12, 2009, 1:05am UTC](https://www.ruby-forum.com/t/setting-up-remote-rails/160120/3 "2009-02-12T01:05:40Z")

</div>

- Does the server have firewall?

What does your database.yml look like?

* * *

production:  
username: mysql\_user  
adapter: mysql  
port: 3306  
host: 127.0.0.1  
password: mysql\_password  
database: my\_database

---

<div class="post-metadata">

**Author:** ![The\_Dro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/85e7bf/32.png) [@The\_Dro](https://www.ruby-forum.com/u/The_Dro)\
**Post date:** [February 12, 2009, 12:18pm UTC](https://www.ruby-forum.com/t/setting-up-remote-rails/160120/4 "2009-02-12T12:18:57Z")

</div>

1  
you might want to configure your apache (or whatever webserver you  
use) to forward your mongrel on port 3000.  
look for something like this (for your webserver and operation  
system):  
[http://schwuk.com/articles/2006/06/13/hosting-rails-applications-with-mongrel-apache-2-mod\_proxy-on-debian-stable](http://schwuk.com/articles/2006/06/13/hosting-rails-applications-with-mongrel-apache-2-mod_proxy-on-debian-stable)

2  
as long as your database.yml is configured correctly you only need to  
make sure that you have sufficient rights to access that database. run  
mysql -uroot -ppassword  
and adjust settings (e.g. create database, grant access for chosen  
user,…)

---

<div class="post-metadata">

**Author:** ![The\_Dro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/85e7bf/32.png) [@The\_Dro](https://www.ruby-forum.com/u/The_Dro)\
**Post date:** [February 12, 2009, 11:31am UTC](https://www.ruby-forum.com/t/setting-up-remote-rails/160120/5 "2009-02-12T11:31:23Z")

</div>

who did you start your ror server? which one are you using?
