Re: [Rails] Re: Newbie question about views folder
On Sat, May 22, 2010 at 8:35 PM, FrankMurphy sabir.a.ibra...@gmail.com wrote: Okay, I got it to work on the domain root by editing /etc/apache2/ sites-available/default to point to the app's public directory. Is that the right way to go about it, or is that just a hack? If that's what I'm supposed to do, it seems odd that this step isn't mentioned in the mod_rails user guide. I still can't get it to work on a sub-uri using an analogous technique (i.e., creating a virtual host file for the URI in /etc/apache2/sites-available)... On May 21, 9:23 pm, FrankMurphy sabir.a.ibra...@gmail.com wrote: Thanks everyone for your replies. Okay, so this is interesting. When I try deploying the app to the domain root, I can't see the Welcome aboard! page; instead, I see the index.html page that's in Apache's web root directory. Also, when I try http://server_addr/users, I see a directory listing of the (.erb) files that are in the demo_app/app/views/users. Does this mean that Passenger is not set up correctly? I don't know if it matters, but the server I'm using doesn't have a domain name; I'm accessing it using its IP address. Yes I think that matters, in the example you gave in the first post you had VirtualHost *:80 ServerName server_addr DocumentRoot /projects/demo_app/public RailsBaseURI /demo_app /VirtualHost This is what Apache calls a name-based virtual host http://httpd.apache.org/docs/2.2/vhosts/name-based.html If you use an ip address like 192.168.1.123 as the value for the ServerName directive, apache will do a reverse dns search to try to find a NAME. http://httpd.apache.org/docs/2.2/mod/core.html#servername If the server actually has a unique ip address for the app, then you might look at setting up an ip address based virtual host after reading the caveats in the first section of the first url I cited. But the simpler thing would probably be to use a name based vhost and configure the client's dns to resolve the name to the ip address so you can use it in the browser urls. Just putting a line in /etc/hosts (or the equivalent if the client is a doze machine) should be enough. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://github.com/rubyredrick Twitter: @RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale -- 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Newbie question about views folder
FrankMurphy wrote: Thanks everyone for your replies. Okay, so this is interesting. When I try deploying the app to the domain root, I can't see the Welcome aboard! page; instead, I see the index.html page that's in Apache's web root directory. Also, when I try http://server_addr/users, I see a directory listing of the (.erb) files that are in the demo_app/app/views/users. Does this mean that Passenger is not set up correctly? Yes. For your own sanity, set up Rails on your local box and don't worry about the remote server yet. I don't know if it matters, but the server I'm using doesn't have a domain name; I'm accessing it using its IP address. Shouldn't matter. On May 21, 7:47�pm, Frederick Cheung frederick.che...@gmail.com Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via http://www.ruby-forum.com/. -- 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Newbie question about views folder
Okay, I got it to work on the domain root by editing /etc/apache2/ sites-available/default to point to the app's public directory. Is that the right way to go about it, or is that just a hack? If that's what I'm supposed to do, it seems odd that this step isn't mentioned in the mod_rails user guide. I still can't get it to work on a sub-uri using an analogous technique (i.e., creating a virtual host file for the URI in /etc/apache2/sites-available)... On May 21, 9:23 pm, FrankMurphy sabir.a.ibra...@gmail.com wrote: Thanks everyone for your replies. Okay, so this is interesting. When I try deploying the app to the domain root, I can't see the Welcome aboard! page; instead, I see the index.html page that's in Apache's web root directory. Also, when I try http://server_addr/users, I see a directory listing of the (.erb) files that are in the demo_app/app/views/users. Does this mean that Passenger is not set up correctly? I don't know if it matters, but the server I'm using doesn't have a domain name; I'm accessing it using its IP address. On May 21, 7:47 pm, Frederick Cheung frederick.che...@gmail.com wrote: On May 22, 2:45 am, FrankMurphy sabir.a.ibra...@gmail.com wrote: 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 seehttp://0.0.0.0:3000/usersjustfine. 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? Deploying an app to a sub uri (rather than to the root of your domain) is not the simplest case - you might want to try that first to reassure yourself that everything is basically working. What you've done doesn't seem to quite match the instructions athttp://www.modrails.com/documentation/Users%20guide%20Apache.html#dep... Fred 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Newbie question about views folder
On May 22, 2:45 am, FrankMurphy sabir.a.ibra...@gmail.com wrote: 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 seehttp://0.0.0.0:3000/usersjust 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? Deploying an app to a sub uri (rather than to the root of your domain) is not the simplest case - you might want to try that first to reassure yourself that everything is basically working. What you've done doesn't seem to quite match the instructions at http://www.modrails.com/documentation/Users%20guide%20Apache.html#deploying_rails_to_sub_uri Fred 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] Re: Newbie question about views folder
Hi Fred, On Fri, May 21, 2010 at 9:47 PM, Frederick Cheung frederick.che...@gmail.com wrote: On May 22, 2:45 am, FrankMurphy sabir.a.ibra...@gmail.com wrote: Deploying an app to a sub uri (rather than to the root of your domain) I missed that. Excellent catch, as always. Best regards, Bill -- 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Re: Newbie question about views folder
Thanks everyone for your replies. Okay, so this is interesting. When I try deploying the app to the domain root, I can't see the Welcome aboard! page; instead, I see the index.html page that's in Apache's web root directory. Also, when I try http://server_addr/users, I see a directory listing of the (.erb) files that are in the demo_app/app/views/users. Does this mean that Passenger is not set up correctly? I don't know if it matters, but the server I'm using doesn't have a domain name; I'm accessing it using its IP address. On May 21, 7:47 pm, Frederick Cheung frederick.che...@gmail.com wrote: On May 22, 2:45 am, FrankMurphy sabir.a.ibra...@gmail.com wrote: 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 seehttp://0.0.0.0:3000/usersjustfine. 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? Deploying an app to a sub uri (rather than to the root of your domain) is not the simplest case - you might want to try that first to reassure yourself that everything is basically working. What you've done doesn't seem to quite match the instructions athttp://www.modrails.com/documentation/Users%20guide%20Apache.html#dep... Fred 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en. -- 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.