How to start server for site with no /script/server/ script?

I’m a newbie to Rails and can’t get a site working that doesn’t have a
/script/server scripts.

I setup Ruby on Rails to run on Fedora and created a new website
(“myfirstrails”). When I run “./script/server -d” from within the
“/myfirstrails” folder, WEBrick boots and I can access the site via
http://www.myfirstrails.com:3000.

However, I am trying to migrate an existing rails site to the same
server. This site (“mynewsite”) does not have a /script/server/
folder…so I’m not sure how to start the server for it.

It seems like I should be able to start the server globally and then run
any number of sites on it.

Any ideas?

Ben C. wrote:

I’m a newbie to Rails and can’t get a site working that doesn’t have a
/script/server scripts.

I setup Ruby on Rails to run on Fedora and created a new website
(“myfirstrails”). When I run “./script/server -d” from within the
“/myfirstrails” folder, WEBrick boots and I can access the site via
http://www.myfirstrails.com:3000.

However, I am trying to migrate an existing rails site to the same
server. This site (“mynewsite”) does not have a /script/server/
folder…so I’m not sure how to start the server for it.

No script/server? That’s unusual. In any case, you can probably copy it
in from another Rails app.

It seems like I should be able to start the server globally and then run
any number of sites on it.

You’d need Passenger (or similar) for that. The Mongrel and WEBrick
implementations that come with Rails aren’t designed that way.

Any ideas?

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

When running Apache2 + Passenger you do not use the scripts. It is also possible to run mongrel_rails manually. Try 'mongrel_rails help' for some info.

Good luck
Norm

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

The first thing you should check is that the version of Rails you have
installed is the version your target application (the one you’re
trying to migrate) is expecting to use.

  1. “rails --version” will tell you what you’ve got installed.

  2. target_app/config/environment.rb will have a line like:
    “RAILS_GEM_VERSION = ‘2.3.4’ unless defined? RAILS_GEM_VERSION”

If these versions match you’re in good shape.

The second thing you need to check is that you support the database
your target is expecting to use.

  1. target_app/config/database.yml will have three lines like “adapter:
    postgresql”, one each for development, test, and production modes.

If you support that db you’re in good shape.

If you’re in good shape on both counts, you should be able to run:

“rails -d db target_app”
“cp -R source_dir/target_app/* target_dir/target_app”

At which point you should be able to edit the target_app/config/
database.yml to suit, run the migrations, and get on with life…

On Oct 27, 5:33 pm, Ben C. [email protected]