Hi,
I just started out learning Ruby on Rails this week. I'm using Michael
Hartl's book, but I'm working on a remote server rather than my local
computer. As such, I'm using Apache + Passenger to deploy the example
programs rather than Mongrel. Also, I'm using MySQL for my database
instead of SQLite.
My issue is that I don't understand how to deploy a program on a
remote server using Apache + Passenger in a way that makes the
contents of the views directory accessible. For instance, if I create
a sample program 'demo_app' and create a 'users' resource with the
command:
$ script/generate scaffold User name:string email:string
and then migrate with the command:
$ rake db:migrate
I can't see the 'users' folder or anything in it when I point my
browser to the remote server. I can see the standard 'Welcome aboard!'
page at http://<server_addr>/demo_app, but http://<server_addr>/demo_app/users
gives me a 404 Not Found. In my apache2.conf file, I have the
following VirtualHost specification:
<VirtualHost *:80>
ServerName <server_addr>
DocumentRoot /projects/demo_app/public
RailsBaseURI /demo_app
</VirtualHost>
In my web root directory, 'demo_app' is a symbolic link to the
application's public directory. I realize that there's nothing in my
web root directory or the above VirtualHost specification that points
to the 'users' resource, but when I build this app locally and view it
with Mongrel, I can see http://0.0.0.0:3000/users just fine. All of
the documentation I've read indicates that the above specification and
symbolic link are all I need to create to deploy an app on a remote
server with Apache + Passenger. Do I need to do something else to
access http://<server_addr>/demo_app/users? Have I missed an obvious
or elementary step? Am I misunderstanding something? Am I on another
planet?
Any help would be greatly appreciated.
--
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.