Confused on RoR deployment

sorry if this seems to be a dumb question. i just started trying to
learn RoR this week. basically i got everything running great locally on
my mac. i have a dedicated server that i’d like to start using ruby on
rails for but i’m a little nervous about installing it.

the main thing is deplyment in apache. i have apache turned on locally,
but i think it’s still using WEBrick. i don’t know how to put my rails
apps in the root and access them without adding “:3000” to the end of
the domain.

my dedicated server is a php/cpanel/whm setup and i found this tutorial
on installing with that type of environment:
http://wiki.rubyonrails.com/rails/pages/HowtoInstallAndRunRubyOnRailsOnCpanel
but i have no idea how this changes the way i create my apps. can i just
run the rails command from any directory and use apache to go to the
right directory? do i not need to run “ruby script/server” anymore?

i have no clue. maybe there answer is somewhere practically right in
front of my face, but i’m not seeing it. any help would be tremendous!

Hi!

I know almost nothing about apache configuration, so i also use cpanel.

Install ruby and rails normally.
Create new user account in cpanel.
Go to its home directory (NOT to public_html).
Run “rails your_app_name”. This should create new directory -
your_app_name.
Now you’ve got 2 choices:

  • you can remove the whole public_html directory and create a link (ln
    -s) to “your_app_name/public” and name it public_html; now you can
    access it simply by “http://user.domain”,
  • or you can create the link to “your_app_name/public” inside
    public_html directory and name it anyway you want; this way you could
    have rails and non rails version of the page and access your rails
    version by “http://user.domain/link/”; ‘/’ at the end is important.

You won’t have to run script/server anymore. However i still don’t know
how to set it up to use fcgi instead of cgi. As i’ve mentioned i don’t
know much about apache and linux, so there are probably better ways to
do it, but it works for me.