Rails development without an open port?

I wish to port an old web app over to Rails but I’m running into
“political” issues. The host of the server I have access to refuses to
open a port for me claiming that an error in a Rails application could
bring down the server. Is there any way to do Rails development without
having an open port?

Please let me know if clarification is needed here.

Thanks!

Theoretically, of course, with sufficient test coverage you should
never actually need to fire up the development server - all the
behavior your application is required to show is defined in tests,
which pass and so you know it works… ^_~

Perhaps more usefully, the most obvious answer is “Don’t develop on
that server.”

You can download all the components you need, often in nice easy to
install packages for just about any OS you use. Try googling for
‘Instant Rails’ or ‘bitnami rails’ if you’re on windows for example.
On linux use yum/aptitude etc. Then only push things up to the server
when they’re fully developed and/or ready for ‘real-world’ testing.

Your second alternative is to use something like ssh port forwarding
(check your ssh help/man page to find out how to do that) to see the
rails application on your local PC without requiring the port to be
opened up to the wider web, with the development mongrel bound to the
localhost or external access to the port firewalled off.

Finally, what is their policy on developing, say, php scripts on the
server? An error in a php script is just as likely to bring down the
server, if not more so. The php script is probably running with
whatever privilege apache has. The rails application, in development
mode, is likely running with just your privileges and in production
can be given it’s own unprivileged user. Which isn’t perfect
security, but it helps.

Hope this helps,
Jon

Hi,
I am using the postgres database.If both the database and project are
in the server(slicehost) then the project is working fine.But the
project is not working when the postgres database is in
server(slicehost).I need to access the server(slicehost) database from
the localhost without opening the postgres database’s port in server.Is
there any possible solution to access?.If not from this way then tell me
the alternate way to do this.Please help me.

Hi,
I have to access the multiple database without port in
database.yml.For example,If one database is having 5432 and another one
is 5442.Then how to connect two databases and access the tables
without using port.Is there any solution for this?.Please help me.

William Ss wrote:

Hi,
I have to access the multiple database without port in
database.yml.

What do you mean?

For example,If one database is having 5432 and another one
is 5442.

You don’t need separate ports for different DB connections.

Then how to connect two databases and access the tables
without using port.Is there any solution for this?.Please help me.

Please explain your situation more clearly.

Best,
–Â
Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Hi,
I am using the postgres database.If both the database and project are
in the server(slicehost) then the project is working fine.But the
project is not working when the postgres database is in
server(slicehost).I need to access the server(slicehost) database from
the localhost without opening the postgres database’s port in server.Is
there any possible solution to access?.If not from this way then tell me
the alternate way to do this.Please help me.

William Ss wrote:

Hi,
I am using the postgres database.If both the database and project are
in the server(slicehost) then the project is working fine.But the
project is not working when the postgres database is in
server(slicehost).I need to access the server(slicehost) database from
the localhost without opening the postgres database’s port in server.

Why do you need to do that? You should have a local database to develop
against.

Is
there any possible solution to access?.If not from this way then tell me
the alternate way to do this.Please help me.

You could use an SSH tunnel. But you really need a local dev database.

Best,
–Â
Marnen Laibow-Koser
http://www.marnen.org
[email protected]