A question, or two?

While it is my first post I thought I’d say “hello” to everyone, so
“hi”.

A little run down about me, I’m a junior developer looking at expanding
my knowledge in programming languages and, in this case, frame works.

I’ve experience in PHP, MySQL, JavaScript and some basic Ruby and RoR.

The main reason for making this post was to ask a question regarding
rails. Question as followed, a lot of thanks to those that help answer:

I’ve had RoR running for about 3 months on my box and played with it but
only on a basic level. One thing that has just come apparent to me is
the fact that to access my rails application I go through port 3000
like: 192.168.1.1:3000. This gives me access to one rails application
but what happens if I have more than one? Can I only run one per server
while using the development server that comes with each rails
application?

Hi –

On Sat, 14 Oct 2006, Steve Clarke wrote:

While it is my first post I thought I’d say “hello” to everyone, so
“hi”.

Hi!

the fact that to access my rails application I go through port 3000
like: 192.168.1.1:3000. This gives me access to one rails application
but what happens if I have more than one? Can I only run one per server
while using the development server that comes with each rails
application?

It depends on which server you’re using, but all the ones you’re
likely to use take a command-line argument, probably -p, to give a
port number – like this:

./script/server webrick -p 3001

or

mongrel_rails start -p 3001

David


David A. Black | [email protected]
Author of “Ruby for Rails” [1] | Ruby/Rails training & consultancy [3]
DABlog (DAB’s Weblog) [2] | Co-director, Ruby Central, Inc. [4]
[1] http://www.manning.com/black | [3] http://www.rubypowerandlight.com
[2] http://dablog.rubypal.com | [4] http://www.rubycentral.org

On Oct 14, 2006, at 2:20 PM, Steve Clarke wrote:

I’ve had RoR running for about 3 months on my box and played with
it but only on a basic level. One thing that has just come apparent
to me is the fact that to access my rails application I go through
port 3000 like: 192.168.1.1:3000. This gives me access to one
rails application but what happens if I have more than one? Can I
only run one per server while using the development server that
comes with each rails application?

If you’re starting the server with

script/server

you can use the -p option to choose which port number the server
starts on. So if you already have one server running on port 3000,
you can start another on 3001 with

script/server -p 3001

James.


James S.
http://jystewart.net/process/

On Oct 14, 2006, at 2:41 PM, Steve Clarke wrote:

Thanks guys, so what you’re saying is each rails application
requires its own port no. for access?

Each server running on a system needs its own port number, and in
development it’s easiest to run a separate server for each application.

In production, you might do things differently.

James.

Thanks guys, so what you’re saying is each rails application requires
its own port no. for access?

On Oct 14, 2006, at 11:41 AM, Steve Clarke wrote:

Thanks guys, so what you’re saying is each rails application requires
its own port no. for access?

They suggested the simplest ways, for development.

In production, you’ll likely have a static web server (nginx, apache,
lighttpd)
providing virtual hosts, serving static, and proxying dynamic
requests back to
mongrel. This configuration allows you assign different Rails
applications to
different IP address, domain names, URIs, ports, etc.

Suffice it to say that there’s nothing negative inherent in Rails
with respect
to deployment.


– Tom M., CTO
– Engine Y., Ruby on Rails Hosting
– Reliability, Ease of Use, Scalability
– (866) 518-YARD (9273)

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs