Setting up remote rails


#1

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” 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


#2

Have you installed the MySQL gem?


#3
  • 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


#4

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

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,…)


#5

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