Hello all, Can anyone point me to any solid documentation on how to set up a production server using RVM, Passenger, and Apache2? I have been at this for a week with absolutely no luck at all so I thought I would post here to see if anyone has managed to get this to work and written down the steps they used. Right now with my current implementation, I am getting a 404 error when I attempt to locally point my browser to a basic rails application. I am attempting to set this up on an Ubuntu 11.10 system. Any help would be greatly appreciated. Thanks in advance. -- 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
mg1313
2011-Dec-14 08:10 UTC
Re: How can I get RVM/Passenger/Apache2 to play nicely together
Try the documentation from here: http://www.mirceagoia.com/2011/11/ruby-on-rails-installation-ubuntu-linux-mint/ Mircea On Dec 13, 10:52 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello all, > > Can anyone point me to any solid documentation on how to set up a > production server using RVM, Passenger, and Apache2? I have been at > this for a week with absolutely no luck at all so I thought I would > post here to see if anyone has managed to get this to work and written > down the steps they used. > > Right now with my current implementation, I am getting a 404 error > when I attempt to locally point my browser to a basic rails > application. > > I am attempting to set this up on an Ubuntu 11.10 system. > > Any help would be greatly appreciated. > > Thanks in advance.-- 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Brynjolfur Thorvardsson
2011-Dec-14 08:25 UTC
SV: How can I get RVM/Passenger/Apache2 to play nicely together
Have you told Apache where to find your application? -----Oprindelig meddelelse----- Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk@googlegroups.com] På vegne af Vell Sendt: 14. december 2011 04:53 Til: Ruby on Rails: Talk Emne: [Rails] How can I get RVM/Passenger/Apache2 to play nicely together Hello all, Can anyone point me to any solid documentation on how to set up a production server using RVM, Passenger, and Apache2? I have been at this for a week with absolutely no luck at all so I thought I would post here to see if anyone has managed to get this to work and written down the steps they used. Right now with my current implementation, I am getting a 404 error when I attempt to locally point my browser to a basic rails application. I am attempting to set this up on an Ubuntu 11.10 system. Any help would be greatly appreciated. Thanks in advance. -- 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Vell
2011-Dec-14 15:15 UTC
Re: How can I get RVM/Passenger/Apache2 to play nicely together
Hi Brynjolfur, Yes I believe I have. Here is what I have as my configs: /etc/apache2/apache2.conf: LoadModule passenger_module /home/vmcilwain/.rvm/gems/ruby-1.9.2-p290/ gems/passenger 3.0.11/ext/apache2/mod_passenger.so PassengerRoot /home/vmcilwain/.rvm/gems/ruby-1.9.2-p290/gems/ passenger-3.0.11 PassengerRuby /home/vmcilwain/.rvm/wrappers/ruby-1.9.2-p290/ruby /etc/apache2/sites-available/vell: <VirtualHost *:80>` ServerName vell DocumentRoot "/home/lmcilwain/vell/current/public" ErrorLog "/var/log/apache2/vell-error_log" CustomLog "/var/log/apache2/vell-access_log" common <Directory "/var/www/sites/vell/current/public"> Options All AllowOverride All Order allow,deny Allow from all </Directory> RewriteEngine On # Remove the www RewriteCond %{HTTP_HOST} ^vell$ [NC] RewriteRule ^(.*)$ http://vell/$1 [R=301,L] </VirtualHost> On Dec 14, 3:25 am, Brynjolfur Thorvardsson <bi...-6eh5JQIm30aHXe+LvDLADg@public.gmane.org> wrote:> Have you told Apache where to find your application? > > -----Oprindelig meddelelse----- > Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk@googlegroups.com] På vegne af Vell > Sendt: 14. december 2011 04:53 > Til: Ruby on Rails: Talk > Emne: [Rails] How can I get RVM/Passenger/Apache2 to play nicely together > > Hello all, > > Can anyone point me to any solid documentation on how to set up a production server using RVM, Passenger, and Apache2? I have been at this for a week with absolutely no luck at all so I thought I would post here to see if anyone has managed to get this to work and written down the steps they used. > > Right now with my current implementation, I am getting a 404 error when I attempt to locally point my browser to a basic rails application. > > I am attempting to set this up on an Ubuntu 11.10 system. > > Any help would be greatly appreciated. > > Thanks in advance. > > -- > 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Vell
2011-Dec-14 15:15 UTC
Re: How can I get RVM/Passenger/Apache2 to play nicely together
Thanks mg1313 I will take a look at this. On Dec 14, 3:10 am, mg1313 <mirceag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Try the documentation from here:http://www.mirceagoia.com/2011/11/ruby-on-rails-installation-ubuntu-l... > > Mircea > > On Dec 13, 10:52 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > Hello all, > > > Can anyone point me to any solid documentation on how to set up a > > production server using RVM, Passenger, and Apache2? I have been at > > this for a week with absolutely no luck at all so I thought I would > > post here to see if anyone has managed to get this to work and written > > down the steps they used. > > > Right now with my current implementation, I am getting a 404 error > > when I attempt to locally point my browser to a basic rails > > application. > > > I am attempting to set this up on an Ubuntu 11.10 system. > > > Any help would be greatly appreciated. > > > Thanks in advance.-- 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Walter Lee Davis
2011-Dec-14 15:45 UTC
Re: Re: How can I get RVM/Passenger/Apache2 to play nicely together
On Dec 14, 2011, at 10:15 AM, Vell wrote:> Hi Brynjolfur, > > Yes I believe I have. Here is what I have as my configs: > > /etc/apache2/apache2.conf: > > LoadModule passenger_module /home/vmcilwain/.rvm/gems/ruby-1.9.2-p290/ > gems/passenger 3.0.11/ext/apache2/mod_passenger.so > PassengerRoot /home/vmcilwain/.rvm/gems/ruby-1.9.2-p290/gems/ > passenger-3.0.11 > PassengerRuby /home/vmcilwain/.rvm/wrappers/ruby-1.9.2-p290/ruby > > > /etc/apache2/sites-available/vell: > > <VirtualHost *:80>` > ServerName vell > DocumentRoot "/home/lmcilwain/vell/current/public" > ErrorLog "/var/log/apache2/vell-error_log" > CustomLog "/var/log/apache2/vell-access_log" common > <Directory "/var/www/sites/vell/current/public"> > Options All > AllowOverride All > Order allow,deny > Allow from all > </Directory> > RewriteEngine On > # Remove the www > RewriteCond %{HTTP_HOST} ^vell$ [NC] > RewriteRule ^(.*)$ http://vell/$1 [R=301,L] > </VirtualHost> >Does Apache have permission to read that folder? Do you see anything in your Apache error log, or the system error log, related to access permissions on that particular Ruby binary? I''ve only ever installed this combination on a server, and I use the "install as root" path through the RVM instructions in that case. It works perfectly for me when I do that, but since this is your dev box (I''m assuming) you might not want to do the same. Walter> > On Dec 14, 3:25 am, Brynjolfur Thorvardsson <bi...-6eh5JQIm30aHXe+LvDLADg@public.gmane.org> wrote: >> Have you told Apache where to find your application? >> >> -----Oprindelig meddelelse----- >> Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk@googlegroups.com] På vegne af Vell >> Sendt: 14. december 2011 04:53 >> Til: Ruby on Rails: Talk >> Emne: [Rails] How can I get RVM/Passenger/Apache2 to play nicely together >> >> Hello all, >> >> Can anyone point me to any solid documentation on how to set up a production server using RVM, Passenger, and Apache2? I have been at this for a week with absolutely no luck at all so I thought I would post here to see if anyone has managed to get this to work and written down the steps they used. >> >> Right now with my current implementation, I am getting a 404 error when I attempt to locally point my browser to a basic rails application. >> >> I am attempting to set this up on an Ubuntu 11.10 system. >> >> Any help would be greatly appreciated. >> >> Thanks in advance. >> >> -- >> 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Brynjolfur Thorvardsson
2011-Dec-14 16:05 UTC
SV: Re: How can I get RVM/Passenger/Apache2 to play nicely together
Hi Vell, I''m rather new to all this myself and have been going through all the usual installation woes. I don''t know if you have tried this but you could fire up Webbrick to see if the problem is with Apache or Rails. Go to the root of your Rails application (/home/lmcilwain/vell/current) and type: $sudo rails server --port=88 Now you should see your Rails site running on port 88. If you don''t, the problem is with Rails. Otherwise it is with Apache. The next thing to do would be to check Apache log files, they should give much better info on what went wrong. Regards Binni -----Oprindelig meddelelse----- Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk@googlegroups.com] På vegne af Vell Sendt: 14. december 2011 16:16 Til: Ruby on Rails: Talk Emne: [Rails] Re: How can I get RVM/Passenger/Apache2 to play nicely together Hi Brynjolfur, Yes I believe I have. Here is what I have as my configs: /etc/apache2/apache2.conf: LoadModule passenger_module /home/vmcilwain/.rvm/gems/ruby-1.9.2-p290/ gems/passenger 3.0.11/ext/apache2/mod_passenger.so PassengerRoot /home/vmcilwain/.rvm/gems/ruby-1.9.2-p290/gems/ passenger-3.0.11 PassengerRuby /home/vmcilwain/.rvm/wrappers/ruby-1.9.2-p290/ruby /etc/apache2/sites-available/vell: <VirtualHost *:80>` ServerName vell DocumentRoot "/home/lmcilwain/vell/current/public" ErrorLog "/var/log/apache2/vell-error_log" CustomLog "/var/log/apache2/vell-access_log" common <Directory "/var/www/sites/vell/current/public"> Options All AllowOverride All Order allow,deny Allow from all </Directory> RewriteEngine On # Remove the www RewriteCond %{HTTP_HOST} ^vell$ [NC] RewriteRule ^(.*)$ http://vell/$1 [R=301,L] </VirtualHost> On Dec 14, 3:25 am, Brynjolfur Thorvardsson <bi...-6eh5JQIm30aHXe+LvDLADg@public.gmane.org> wrote:> Have you told Apache where to find your application? > > -----Oprindelig meddelelse----- > Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] På vegne af Vell > Sendt: 14. december 2011 04:53 > Til: Ruby on Rails: Talk > Emne: [Rails] How can I get RVM/Passenger/Apache2 to play nicely > together > > Hello all, > > Can anyone point me to any solid documentation on how to set up a production server using RVM, Passenger, and Apache2? I have been at this for a week with absolutely no luck at all so I thought I would post here to see if anyone has managed to get this to work and written down the steps they used. > > Right now with my current implementation, I am getting a 404 error when I attempt to locally point my browser to a basic rails application. > > I am attempting to set this up on an Ubuntu 11.10 system. > > Any help would be greatly appreciated. > > Thanks in advance. > > -- > 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2011-Dec-14 16:21 UTC
Re: How can I get RVM/Passenger/Apache2 to play nicely together
On Dec 14, 3:15 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> DocumentRoot "/home/lmcilwain/vell/current/public" > <Directory "/var/www/sites/vell/current/public">The fact that these two paths don''t match is suspicious to me. You''d want both pointing at wherever it is on this that your app is. Fred -- 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Vell
2011-Dec-14 18:36 UTC
Re: How can I get RVM/Passenger/Apache2 to play nicely together
Hi Walter, I will confirm that Apache can read that directory when I get home. When I looked at the process apache was running as root:www-data which is what I set the permissions of the directory to. The Apache error log and the access long didn''t have any additional detail. As a matter of fact the error log had the same statement as the browser window. I did not think to check the system log to see if there were access permissions to the ruby binary in my home directory. I will definitely check that again once I get home. This box would be used for production not development so installing it as root I wouldn''t have a problem with. I just remembered seeing something on RVMs site about it not being the recommended approach for one reason or another which is why I did not try it. On Dec 14, 10:45 am, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:> On Dec 14, 2011, at 10:15 AM, Vell wrote: > > > > > > > > > > > Hi Brynjolfur, > > > Yes I believe I have. Here is what I have as my configs: > > > /etc/apache2/apache2.conf: > > > LoadModule passenger_module /home/vmcilwain/.rvm/gems/ruby-1.9.2-p290/ > > gems/passenger 3.0.11/ext/apache2/mod_passenger.so > > PassengerRoot /home/vmcilwain/.rvm/gems/ruby-1.9.2-p290/gems/ > > passenger-3.0.11 > > PassengerRuby /home/vmcilwain/.rvm/wrappers/ruby-1.9.2-p290/ruby > > > /etc/apache2/sites-available/vell: > > > <VirtualHost *:80>` > > ServerName vell > > DocumentRoot "/home/lmcilwain/vell/current/public" > > ErrorLog "/var/log/apache2/vell-error_log" > > CustomLog "/var/log/apache2/vell-access_log" common > > <Directory "/var/www/sites/vell/current/public"> > > Options All > > AllowOverride All > > Order allow,deny > > Allow from all > > </Directory> > > RewriteEngine On > > # Remove the www > > RewriteCond %{HTTP_HOST} ^vell$ [NC] > > RewriteRule ^(.*)$http://vell/$1[R=301,L] > > </VirtualHost> > > Does Apache have permission to read that folder? Do you see anything in your Apache error log, or the system error log, related to access permissions on that particular Ruby binary? > > I''ve only ever installed this combination on a server, and I use the "install as root" path through the RVM instructions in that case. It works perfectly for me when I do that, but since this is your dev box (I''m assuming) you might not want to do the same. > > Walter > > > > > > > > > > > On Dec 14, 3:25 am, Brynjolfur Thorvardsson <bi...-6eh5JQIm30aHXe+LvDLADg@public.gmane.org> wrote: > >> Have you told Apache where to find your application? > > >> -----Oprindelig meddelelse----- > >> Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk@googlegroups.com] På vegne af Vell > >> Sendt: 14. december 2011 04:53 > >> Til: Ruby on Rails: Talk > >> Emne: [Rails] How can I get RVM/Passenger/Apache2 to play nicely together > > >> Hello all, > > >> Can anyone point me to any solid documentation on how to set up a production server using RVM, Passenger, and Apache2? I have been at this for a week with absolutely no luck at all so I thought I would post here to see if anyone has managed to get this to work and written down the steps they used. > > >> Right now with my current implementation, I am getting a 404 error when I attempt to locally point my browser to a basic rails application. > > >> I am attempting to set this up on an Ubuntu 11.10 system. > > >> Any help would be greatly appreciated. > > >> Thanks in advance. > > >> -- > >> 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org. > >> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > >> 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Vell
2011-Dec-14 18:38 UTC
Re: How can I get RVM/Passenger/Apache2 to play nicely together
Thanks Binni, I will definitely give that a try as well to see if my app is functioning properly. On Dec 14, 11:05 am, Brynjolfur Thorvardsson <bi...-6eh5JQIm30aHXe+LvDLADg@public.gmane.org> wrote:> Hi Vell, I''m rather new to all this myself and have been going through all the usual installation woes. > > I don''t know if you have tried this but you could fire up Webbrick to see if the problem is with Apache or Rails. Go to the root of your Rails application (/home/lmcilwain/vell/current) and type: > $sudo rails server --port=88 > > Now you should see your Rails site running on port 88. If you don''t, the problem is with Rails. Otherwise it is with Apache. The next thing to do would be to check Apache log files, they should give much better info on what went wrong. > > Regards > > Binni > > -----Oprindelig meddelelse----- > Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk@googlegroups.com] På vegne af Vell > Sendt: 14. december 2011 16:16 > Til: Ruby on Rails: Talk > Emne: [Rails] Re: How can I get RVM/Passenger/Apache2 to play nicely together > > Hi Brynjolfur, > > Yes I believe I have. Here is what I have as my configs: > > /etc/apache2/apache2.conf: > > LoadModule passenger_module /home/vmcilwain/.rvm/gems/ruby-1.9.2-p290/ > gems/passenger 3.0.11/ext/apache2/mod_passenger.so > PassengerRoot /home/vmcilwain/.rvm/gems/ruby-1.9.2-p290/gems/ > passenger-3.0.11 > PassengerRuby /home/vmcilwain/.rvm/wrappers/ruby-1.9.2-p290/ruby > > /etc/apache2/sites-available/vell: > > <VirtualHost *:80>` > ServerName vell > DocumentRoot "/home/lmcilwain/vell/current/public" > ErrorLog "/var/log/apache2/vell-error_log" > CustomLog "/var/log/apache2/vell-access_log" common <Directory "/var/www/sites/vell/current/public"> > Options All > AllowOverride All > Order allow,deny > Allow from all > </Directory> > RewriteEngine On > # Remove the www > RewriteCond %{HTTP_HOST} ^vell$ [NC] > RewriteRule ^(.*)$http://vell/$1[R=301,L] </VirtualHost> > > On Dec 14, 3:25 am, Brynjolfur Thorvardsson <bi...-6eh5JQIm30aHXe+LvDLADg@public.gmane.org> wrote: > > > > > > > > > > > Have you told Apache where to find your application? > > > -----Oprindelig meddelelse----- > > Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > [mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] På vegne af Vell > > Sendt: 14. december 2011 04:53 > > Til: Ruby on Rails: Talk > > Emne: [Rails] How can I get RVM/Passenger/Apache2 to play nicely > > together > > > Hello all, > > > Can anyone point me to any solid documentation on how to set up a production server using RVM, Passenger, and Apache2? I have been at this for a week with absolutely no luck at all so I thought I would post here to see if anyone has managed to get this to work and written down the steps they used. > > > Right now with my current implementation, I am getting a 404 error when I attempt to locally point my browser to a basic rails application. > > > I am attempting to set this up on an Ubuntu 11.10 system. > > > Any help would be greatly appreciated. > > > Thanks in advance. > > > -- > > 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Vell
2011-Dec-14 18:51 UTC
Re: How can I get RVM/Passenger/Apache2 to play nicely together
That is a very good catch. I will certainly make that change as well. I am at the point that I am also going to re-install ubuntu and start from scratch just to eliminate any other possibilities that might be happening behind the scenes. I will post my success of failure once I am done. On Dec 14, 11:21 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Dec 14, 3:15 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > DocumentRoot "/home/lmcilwain/vell/current/public" > > <Directory "/var/www/sites/vell/current/public"> > > The fact that these two paths don''t match is suspicious to me. You''d > want both pointing at wherever it is on this that your app is. > > Fred-- 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Jeff Lewis
2011-Dec-14 19:35 UTC
Re: How can I get RVM/Passenger/Apache2 to play nicely together
Hi Vell, Once you figure out that apache vhost path / read issue on your new setup, .... If you''re using passenger and you''re running rvm, then you''re likely using (or will use) different rubies and/or gemsets for projects on a given machine. If so, then you might want to consider using passenger- standalone instead of passenger-apache-module: http://www.modrails.com/documentation/Users%20guide%20Standalone.html The main benefit of running passenger-standalone is that you can run multiple projects that use diff rubies/gemsets from the same apache (/ nginx/...). Here''s an example setup from the phusion folks: http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-ruby-versions/ I''ve been using passenger-standalone in production for over a year now on a number of projects, and it works well. Those clients that use passenger no longer use passenger-module and instead just use proxy''d passenger-standalone for both their dev and prod envs. Here''s an example of the setup on a local dev instance for a given rvm passenger-standalone project where I typically maintain an rvm gemset per project: ####### localhost subdomain for the proj: $ cat /etc/hosts ... 127.0.0.1 foo.localhost ... ###### vhost conf for the proj: $ cat /etc/apache2/sites-available/foo.conf #### http://foo.localhost/ <VirtualHost *:80> ServerName foo.localhost DocumentRoot /path/to/foo/public <Directory /path/to/foo/public> AllowOverride all Options -MultiViews </Directory> ProxyRequests Off <Proxy *> Order deny,allow Deny from all Allow from 127.0.0.1 </Proxy> ProxyPass / http://127.0.0.1:3044/ ProxyPassReverse / http://127.0.0.1:3044/ RewriteEngine On RewriteCond %{LA-U:REMOTE_USER} (.+) RewriteRule . - [E=RU:%1] RequestHeader add X-Forwarded-User %{RU}e ProxyPreserveHost on CustomLog /var/log/apache2/foo_access_log combined ErrorLog /var/log/apache2/foo_error_log ErrorDocument 503 "<!DOCTYPE html><html><head><meta http- equiv=''Content-Type'' content=''text/html; charset=UTF-8'' /><title>Foo Service Is Temporarily Unavailable (503)</title></head><body><h2>Foo Service Is Temporarily Unavailable (503)</h2><p>The Foo service is temporarily unable to process your request due to maintenance downtime.</p><p>Thanks for your patience. Please try again later.</p></ body></html>" </VirtualHost> ###### I usually have a custom script to ###### manage rails env server for proj: $ pwd /path/to/foo $ cat ./script/foo_env_server.rb ### ### foo_env_server.rb is used to start/stop/restart/status the foo env. ### ### Usage: $ ruby ./script/foo_env_server.rb ENV ACTION ### ENV : development or production ### ACTION : start, stop, restart or status ### ### Note: currently serving foo rails app using passenger-standalone ### proxy''d via apache. ### APP_NAME = "foo" DEV_PORT = 3044 PROD_PORT = 8044 PROJ_ROOT = File.expand_path("#{File.dirname(__FILE__)}/..") DEV_ENV = "development" PROD_ENV = "production" ENVS = [ DEV_ENV, PROD_ENV ] LOG_FNAMES = { DEV_ENV=>"#{PROJ_ROOT}/log/#{DEV_ENV}.log", PROD_ENV=>"#{PROJ_ROOT}/log/#{PROD_ENV}.log" } PID_FNAMES = { DEV_ENV=>"#{PROJ_ROOT}/tmp/pid/#{DEV_ENV}-passenger- #{DEV_PORT}.pid", PROD_ENV=>"#{PROJ_ROOT}/tmp/pid/#{PROD_ENV}- passenger-#{PROD_PORT}.pid" } PORTS = { DEV_ENV=>DEV_PORT, PROD_ENV=>PROD_PORT } ACTIONS = [ ''status'', ''start'', ''stop'', ''restart'' ] ... def start(env) port = PORTS[env] pid_fname = PID_FNAMES[env] log_fname = LOG_FNAMES[env] ... # start env server. res = `passenger start --port #{port} --environment #{env} --log- file #{log_fname} --pid-file #{pid_fname} --daemonize 2>&1`.strip ... end ... $ rvm 1.9.2@foo && ruby ./script/foo_env_server.rb development restart ... foo development env on port 3044: started: pid = 26797 (saved to / path/to/foo/tmp/pid/development-passenger-3044.pid) ###### test serving static content?: $ echo "hi from static foo" > ./public/foo.txt && curl -si http://foo.localhost/foo.txt && rm ./public/foo.txt HTTP/1.1 200 OK ... hi from static foo ###### test serving dynamic content?: $ cat ./config/routes.rb ... match ''/ping'' => ''misc#ping'', :via => [:get] ... $ cat ./app/controllers/misc_controller.rb ... def ping render(:text=>"1\n") end ... $ curl -si http://foo.localhost/ping HTTP/1.1 200 OK ... 1 Another general benefit of this type of proxy''d setup is that if you or your client decides they want to test / use a diff rails app server for the proj, like unicorn or thin or ...., it''s a lot easier to make that switch (basically, stop curr env, install new gems as required, mod ./script/foo_env_server.rb start call, start env, test, ....). Jeff On Dec 14, 10:51 am, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> That is a very good catch. I will certainly make that change as well. > I am at the point that I am also going to re-install ubuntu and start > from scratch just to eliminate any other possibilities that might be > happening behind the scenes. I will post my success of failure once I > am done. > > On Dec 14, 11:21 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > > > > > > > On Dec 14, 3:15 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > DocumentRoot "/home/lmcilwain/vell/current/public" > > > <Directory "/var/www/sites/vell/current/public"> > > > The fact that these two paths don''t match is suspicious to me. You''d > > want both pointing at wherever it is on this that your app is. > > > Fred-- 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Vell
2011-Dec-14 20:22 UTC
Re: How can I get RVM/Passenger/Apache2 to play nicely together
Thanks for the insight. I think that setup makes a lot more sense. On Dec 14, 2:35 pm, Jeff Lewis <jeff.bu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: -- 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Vell
2011-Dec-15 05:06 UTC
Re: How can I get RVM/Passenger/Apache2 to play nicely together
Ok so I tried using the scenario that the phusion blog wrote out but I am still getting a permission denied. I have a freshly installed ubuntu 11.10 system so now I am sure that whats going on is related to one install and not several different install attempts. SOOOO here is what I have. Reference Tutorial: http://www.google.com/url?sa=D&q=http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-ruby-versions/&usg=AFQjCNGMN5oWTn9Sf7yHwK33id7p7PJ-KQ The difference I did from this tutorial is that I wanted rails 1.9.2 to be the default since I won''t be running any 1.8.7 apps. Install goes as follows: 1. Installed rvm (single user) -- For whatever reason when installed multi-user I was not able to load rvm into my terminal after logging in/out 2. Installed ruby 1.9.2 -- rvm install 1.9.2 3. Made 1.9.2 the default -- rvm --default use 1.9.2 4. Added the following to /etc/apache2/apache2.conf: LoadModule passenger_module /home/vmcilwain/.rvm/gems/ruby-1.9.2-p290/ gems/passenger-3.0.11/ext/apache2/mod_passenger.so PassengerRoot /home/vmcilwain/.rvm/gems/ruby-1.9.2-p290/gems/ passenger-3.0.11 PassengerRuby /home/vmcilwain/.rvm/wrappers/ruby-1.9.2-p290/ruby <VirtualHost *:80> ServerName vmcilwain-dell DocumentRoot /home/vmcilwain/sites/vell </VirtualHost> Unfortunately for some reason I am not able get to rubygems.org or github.com so I am not able to run bundle to get all of the necessary gems installed. I get the following error: Fetching source index for http://rubygems.org/ Fetching source index for http://github.com/ Could not reach rubygems repository http://rubygems.org/, http://github.com/ The weird thing is that I am able to ping both domains. Also when I create a brand new rails app bundle runs fine so I am curious about what it does not like about my Gemfile this time around that it had no problem with the last 5 times I have run it for that particular app. With the fresh rails app that I have just created I am not able to create the database using rake db create it is also giving me an error: vmcilwain@vmcilwain--D610:~/vell_new$ bundle exec rake db:create rake aborted! Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (See full trace by running task with --trace) I do have gem ''execjs'' in my Gemfile so I am not sure exactly what I am doing wrong in this case either. On Dec 14, 2:35 pm, Jeff Lewis <jeff.bu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi Vell, > > Once you figure out that apache vhost path / read issue on your new > setup, .... > > If you''re using passenger and you''re running rvm, then you''re likely > using (or will use) different rubies and/or gemsets for projects on a > given machine. If so, then you might want to consider using passenger- > standalone instead of passenger-apache-module: > > http://www.modrails.com/documentation/Users%20guide%20Standalone.html > > The main benefit of running passenger-standalone is that you can run > multiple projects that use diff rubies/gemsets from the same apache (/ > nginx/...). Here''s an example setup from the phusion folks: > > http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-... > > I''ve been using passenger-standalone in production for over a year now > on a number of projects, and it works well. Those clients that use > passenger no longer use passenger-module and instead just use proxy''d > passenger-standalone for both their dev and prod envs. > > Here''s an example of the setup on a local dev instance for a given rvm > passenger-standalone project where I typically maintain an rvm gemset > per project: > > ####### localhost subdomain for the proj: > $ cat /etc/hosts > ... > 127.0.0.1 foo.localhost > ... > > ###### vhost conf for the proj: > > $ cat /etc/apache2/sites-available/foo.conf > ####http://foo.localhost/ > <VirtualHost *:80> > ServerName foo.localhost > DocumentRoot /path/to/foo/public > <Directory /path/to/foo/public> > AllowOverride all > Options -MultiViews > </Directory> > > ProxyRequests Off > <Proxy *> > Order deny,allow > Deny from all > Allow from 127.0.0.1 > </Proxy> > ProxyPass /http://127.0.0.1:3044/ > ProxyPassReverse /http://127.0.0.1:3044/ > RewriteEngine On > RewriteCond %{LA-U:REMOTE_USER} (.+) > RewriteRule . - [E=RU:%1] > RequestHeader add X-Forwarded-User %{RU}e > ProxyPreserveHost on > > CustomLog /var/log/apache2/foo_access_log combined > ErrorLog /var/log/apache2/foo_error_log > > ErrorDocument 503 "<!DOCTYPE html><html><head><meta http- > equiv=''Content-Type'' content=''text/html; charset=UTF-8'' /><title>Foo > Service Is Temporarily Unavailable (503)</title></head><body><h2>Foo > Service Is Temporarily Unavailable (503)</h2><p>The Foo service is > temporarily unable to process your request due to maintenance > downtime.</p><p>Thanks for your patience. Please try again later.</p></ > body></html>" > > </VirtualHost> > > ###### I usually have a custom script to > ###### manage rails env server for proj: > > $ pwd > /path/to/foo > > $ cat ./script/foo_env_server.rb > ### > ### foo_env_server.rb is used to start/stop/restart/status the foo > env. > ### > ### Usage: $ ruby ./script/foo_env_server.rb ENV ACTION > ### ENV : development or production > ### ACTION : start, stop, restart or status > ### > ### Note: currently serving foo rails app using passenger-standalone > ### proxy''d via apache. > ### > > APP_NAME = "foo" > DEV_PORT = 3044 > PROD_PORT = 8044 > > PROJ_ROOT = File.expand_path("#{File.dirname(__FILE__)}/..") > DEV_ENV = "development" > PROD_ENV = "production" > ENVS = [ DEV_ENV, PROD_ENV ] > LOG_FNAMES = { DEV_ENV=>"#{PROJ_ROOT}/log/#{DEV_ENV}.log", > PROD_ENV=>"#{PROJ_ROOT}/log/#{PROD_ENV}.log" } > PID_FNAMES = { DEV_ENV=>"#{PROJ_ROOT}/tmp/pid/#{DEV_ENV}-passenger- > #{DEV_PORT}.pid", PROD_ENV=>"#{PROJ_ROOT}/tmp/pid/#{PROD_ENV}- > passenger-#{PROD_PORT}.pid" } > PORTS = { DEV_ENV=>DEV_PORT, PROD_ENV=>PROD_PORT } > ACTIONS = [ ''status'', ''start'', ''stop'', ''restart'' ] > ... > > def start(env) > port = PORTS[env] > pid_fname = PID_FNAMES[env] > log_fname = LOG_FNAMES[env] > ... > # start env server. > res = `passenger start --port #{port} --environment #{env} --log- > file #{log_fname} --pid-file #{pid_fname} --daemonize 2>&1`.strip > ... > end > ... > > $ rvm 1.9.2@foo && ruby ./script/foo_env_server.rb development restart > ... > foo development env on port 3044: started: pid = 26797 (saved to / > path/to/foo/tmp/pid/development-passenger-3044.pid) > > ###### test serving static content?: > > $ echo "hi from static foo" > ./public/foo.txt && curl -sihttp://foo.localhost/foo.txt&& rm ./public/foo.txt > HTTP/1.1 200 OK > ... > hi from static foo > > ###### test serving dynamic content?: > > $ cat ./config/routes.rb > ... > match ''/ping'' => ''misc#ping'', :via => [:get] > ... > > $ cat ./app/controllers/misc_controller.rb > ... > def ping > render(:text=>"1\n") > end > ... > > $ curl -sihttp://foo.localhost/ping > HTTP/1.1 200 OK > ... > 1 > > Another general benefit of this type of proxy''d setup is that if you > or your client decides they want to test / use a diff rails app server > for the proj, like unicorn or thin or ...., it''s a lot easier to make > that switch (basically, stop curr env, install new gems as required, > mod ./script/foo_env_server.rb start call, start env, test, ....). > > Jeff > > On Dec 14, 10:51 am, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > That is a very good catch. I will certainly make that change as well. > > I am at the point that I am also going to re-install ubuntu and start > > from scratch just to eliminate any other possibilities that might be > > happening behind the scenes. I will post my success of failure once I > > am done. > > > On Dec 14, 11:21 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > wrote: > > > > On Dec 14, 3:15 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > DocumentRoot "/home/lmcilwain/vell/current/public" > > > > <Directory "/var/www/sites/vell/current/public"> > > > > The fact that these two paths don''t match is suspicious to me. You''d > > > want both pointing at wherever it is on this that your app is. > > > > Fred-- 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Brynjolfur Thorvardsson
2011-Dec-15 07:29 UTC
SV: Re: How can I get RVM/Passenger/Apache2 to play nicely together
Hi Vell Doing a reinstall might well save you a lot of hassle. In my last install I used sudo all the way through (the server is a test server for an eventual production server) and no RVM since I was only going to use Ruby 1.9.2 (like you). I wrote down all the steps during the install and this "recipe" works well enough for me. Note that all apt-get installs use sudo, no doubt there are some places where that was unnecessary - but I couldn''t be bothered to find out. The server also has Asterisk installed, you probably don''t need that so I''ve commented out those lines that are Asterisk specific (with ##) but left them in the recipe anyway: During install, Ubuntu 11.10, following packages selected: OpenSSH server LAMP server $sudo visudo ##added last line: <my user name> ALL=(ALL) NOPASSWD: ALL $sudo apt-get update $sudo apt-get upgrade ##$sudo apt-get install asterisk sox asterisk-mysql asterisk-mp3 $sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion $sudo apt-get install ruby1.9.2 $ruby -v >ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux] $gem -v >1.3.7 $sudo gem update $sudo env REALLY_GEM_UPDATE_SYSTEM=1 gem update --system $gem -v >1.8.12 $sudo apt-get install ruby1.9.1-dev ##see: http://rbjl.net/20-rubybuntu-2-troubleshooting-common-ruby-ubuntu-problems $sudo gem install rails -v=3.1.0 $rails -v >Rails 3.1.0 $rake --version >rake, version 0.9.2 $sudo gem install passenger $sudo passenger-install-apache2-module $sudo apt-get install libcurl4-openssl-dev $sudo apt-get install apache2-prefork-dev $sudo apt-get install libapr1-dev $sudo passenger-install-apache2-module $sudo vim /etc/apache2/apache2.conf ##Added these lines at bottom of file: LoadModule passenger_module /usr/lib/ruby/gems/1.9.1/gems/passenger3.0.11/ext/apache2/mod_passenger.so PassengerRoot /usr/lib/ruby/gems/1.9.1/gems/passenger-3.0.11 PassengerRuby /usr/bin/ruby1.9.1 $sudo service apache2 restart ##$sudo gem install adhearsion ##$ahn -v ## >Adhearsion v1.2.3 $sudo apt-get install phpmyadmin ##Install java runtime: $sudo apt-get install python-software-properties $sudo add-apt-repository ppa:chris-lea/node.js $sudo apt-get update $sudo apt-get install nodejs ##### END install - and everything works fine ##### -----Oprindelig meddelelse----- Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk@googlegroups.com] På vegne af Vell Sendt: 15. december 2011 06:06 Til: Ruby on Rails: Talk Emne: [Rails] Re: How can I get RVM/Passenger/Apache2 to play nicely together Ok so I tried using the scenario that the phusion blog wrote out but I am still getting a permission denied. I have a freshly installed ubuntu 11.10 system so now I am sure that whats going on is related to one install and not several different install attempts. SOOOO here is what I have. Reference Tutorial: http://www.google.com/url?sa=D&q=http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-ruby-versions/&usg=AFQjCNGMN5oWTn9Sf7yHwK33id7p7PJ-KQ The difference I did from this tutorial is that I wanted rails 1.9.2 to be the default since I won''t be running any 1.8.7 apps. Install goes as follows: 1. Installed rvm (single user) -- For whatever reason when installed multi-user I was not able to load rvm into my terminal after logging in/out 2. Installed ruby 1.9.2 -- rvm install 1.9.2 3. Made 1.9.2 the default -- rvm --default use 1.9.2 4. Added the following to /etc/apache2/apache2.conf: LoadModule passenger_module /home/vmcilwain/.rvm/gems/ruby-1.9.2-p290/ gems/passenger-3.0.11/ext/apache2/mod_passenger.so PassengerRoot /home/vmcilwain/.rvm/gems/ruby-1.9.2-p290/gems/ passenger-3.0.11 PassengerRuby /home/vmcilwain/.rvm/wrappers/ruby-1.9.2-p290/ruby <VirtualHost *:80> ServerName vmcilwain-dell DocumentRoot /home/vmcilwain/sites/vell </VirtualHost> Unfortunately for some reason I am not able get to rubygems.org or github.com so I am not able to run bundle to get all of the necessary gems installed. I get the following error: Fetching source index for http://rubygems.org/ Fetching source index for http://github.com/ Could not reach rubygems repository http://rubygems.org/, http://github.com/ The weird thing is that I am able to ping both domains. Also when I create a brand new rails app bundle runs fine so I am curious about what it does not like about my Gemfile this time around that it had no problem with the last 5 times I have run it for that particular app. With the fresh rails app that I have just created I am not able to create the database using rake db create it is also giving me an error: vmcilwain@vmcilwain--D610:~/vell_new$ bundle exec rake db:create rake aborted! Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (See full trace by running task with --trace) I do have gem ''execjs'' in my Gemfile so I am not sure exactly what I am doing wrong in this case either. On Dec 14, 2:35 pm, Jeff Lewis <jeff.bu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi Vell, > > Once you figure out that apache vhost path / read issue on your new > setup, .... > > If you''re using passenger and you''re running rvm, then you''re likely > using (or will use) different rubies and/or gemsets for projects on a > given machine. If so, then you might want to consider using passenger- > standalone instead of passenger-apache-module: > > http://www.modrails.com/documentation/Users%20guide%20Standalone.html > > The main benefit of running passenger-standalone is that you can run > multiple projects that use diff rubies/gemsets from the same apache (/ > nginx/...). Here''s an example setup from the phusion folks: > > http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-... > > I''ve been using passenger-standalone in production for over a year now > on a number of projects, and it works well. Those clients that use > passenger no longer use passenger-module and instead just use proxy''d > passenger-standalone for both their dev and prod envs. > > Here''s an example of the setup on a local dev instance for a given rvm > passenger-standalone project where I typically maintain an rvm gemset > per project: > > ####### localhost subdomain for the proj: > $ cat /etc/hosts > ... > 127.0.0.1 foo.localhost > ... > > ###### vhost conf for the proj: > > $ cat /etc/apache2/sites-available/foo.conf > ####http://foo.localhost/ > <VirtualHost *:80> > ServerName foo.localhost > DocumentRoot /path/to/foo/public > <Directory /path/to/foo/public> > AllowOverride all > Options -MultiViews > </Directory> > > ProxyRequests Off > <Proxy *> > Order deny,allow > Deny from all > Allow from 127.0.0.1 > </Proxy> > ProxyPass /http://127.0.0.1:3044/ > ProxyPassReverse /http://127.0.0.1:3044/ > RewriteEngine On > RewriteCond %{LA-U:REMOTE_USER} (.+) > RewriteRule . - [E=RU:%1] > RequestHeader add X-Forwarded-User %{RU}e > ProxyPreserveHost on > > CustomLog /var/log/apache2/foo_access_log combined > ErrorLog /var/log/apache2/foo_error_log > > ErrorDocument 503 "<!DOCTYPE html><html><head><meta http- > equiv=''Content-Type'' content=''text/html; charset=UTF-8'' /><title>Foo > Service Is Temporarily Unavailable (503)</title></head><body><h2>Foo > Service Is Temporarily Unavailable (503)</h2><p>The Foo service is > temporarily unable to process your request due to maintenance > downtime.</p><p>Thanks for your patience. Please try again later.</p></ > body></html>" > > </VirtualHost> > > ###### I usually have a custom script to > ###### manage rails env server for proj: > > $ pwd > /path/to/foo > > $ cat ./script/foo_env_server.rb > ### > ### foo_env_server.rb is used to start/stop/restart/status the foo > env. > ### > ### Usage: $ ruby ./script/foo_env_server.rb ENV ACTION > ### ENV : development or production > ### ACTION : start, stop, restart or status > ### > ### Note: currently serving foo rails app using passenger-standalone > ### proxy''d via apache. > ### > > APP_NAME = "foo" > DEV_PORT = 3044 > PROD_PORT = 8044 > > PROJ_ROOT = File.expand_path("#{File.dirname(__FILE__)}/..") > DEV_ENV = "development" > PROD_ENV = "production" > ENVS = [ DEV_ENV, PROD_ENV ] > LOG_FNAMES = { DEV_ENV=>"#{PROJ_ROOT}/log/#{DEV_ENV}.log", > PROD_ENV=>"#{PROJ_ROOT}/log/#{PROD_ENV}.log" } > PID_FNAMES = { DEV_ENV=>"#{PROJ_ROOT}/tmp/pid/#{DEV_ENV}-passenger- > #{DEV_PORT}.pid", PROD_ENV=>"#{PROJ_ROOT}/tmp/pid/#{PROD_ENV}- > passenger-#{PROD_PORT}.pid" } > PORTS = { DEV_ENV=>DEV_PORT, PROD_ENV=>PROD_PORT } > ACTIONS = [ ''status'', ''start'', ''stop'', ''restart'' ] > ... > > def start(env) > port = PORTS[env] > pid_fname = PID_FNAMES[env] > log_fname = LOG_FNAMES[env] > ... > # start env server. > res = `passenger start --port #{port} --environment #{env} --log- > file #{log_fname} --pid-file #{pid_fname} --daemonize 2>&1`.strip > ... > end > ... > > $ rvm 1.9.2@foo && ruby ./script/foo_env_server.rb development restart > ... > foo development env on port 3044: started: pid = 26797 (saved to / > path/to/foo/tmp/pid/development-passenger-3044.pid) > > ###### test serving static content?: > > $ echo "hi from static foo" > ./public/foo.txt && curl -sihttp://foo.localhost/foo.txt&& rm ./public/foo.txt > HTTP/1.1 200 OK > ... > hi from static foo > > ###### test serving dynamic content?: > > $ cat ./config/routes.rb > ... > match ''/ping'' => ''misc#ping'', :via => [:get] > ... > > $ cat ./app/controllers/misc_controller.rb > ... > def ping > render(:text=>"1\n") > end > ... > > $ curl -sihttp://foo.localhost/ping > HTTP/1.1 200 OK > ... > 1 > > Another general benefit of this type of proxy''d setup is that if you > or your client decides they want to test / use a diff rails app server > for the proj, like unicorn or thin or ...., it''s a lot easier to make > that switch (basically, stop curr env, install new gems as required, > mod ./script/foo_env_server.rb start call, start env, test, ....). > > Jeff > > On Dec 14, 10:51 am, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > That is a very good catch. I will certainly make that change as well. > > I am at the point that I am also going to re-install ubuntu and start > > from scratch just to eliminate any other possibilities that might be > > happening behind the scenes. I will post my success of failure once I > > am done. > > > On Dec 14, 11:21 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > wrote: > > > > On Dec 14, 3:15 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > DocumentRoot "/home/lmcilwain/vell/current/public" > > > > <Directory "/var/www/sites/vell/current/public"> > > > > The fact that these two paths don''t match is suspicious to me. You''d > > > want both pointing at wherever it is on this that your app is. > > > > Fred-- 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Vell
2011-Dec-15 17:54 UTC
Re: How can I get RVM/Passenger/Apache2 to play nicely together
Mircea, I tried this installation guide just now and I am still in the same place. Though the instructions are clear, I am still not able to get to my rails application that is located in my home directory. This is on a fresh installed Ubuntu 11.10 system as well. So here is what has been done, based on that guide: RVM Steup sudo aptitude install build-essential git-core curl bash < <(curl -s https://rvm.beginrescueend.com/install/rvm) echo ''[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/ rvm"'' >> ~/.bashrc rvm notes sudo aptitude install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev zlib libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2- dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison  rvm install 1.9.2 rvm use 1.9.2 rvm --default use 1.9.2 RAILS SETUP 1 gem install rails Added the following to my Gemfile gem ''execjs'' gem ''therubyracer'' bundle install rails s (saw my application locally on port 3000) APACHE2 Setup sudo aptitude install apache2 Passenger Setup gem install passenger passenger-install-apache2-module Added the following to /etc/apache2/apache2.conf LoadModule passenger_module /home/user/.rvm/gems/ruby-1.9.2- p290/gems/ passenger-3.0.11/ext/apache2/mod_passenger.so PassengerRoot /home/user/.rvm/gems/ruby-1.9.2-p290/gems/ passenger-3.0.11 PassengerRuby /home/user/.rvm/wrappers/ruby-1.9.2-p290/ restarted apache2 Creating My Site Created directory www in my home directory rails new site -d mysql Added the following to /etc/apache2/sites-available/site <VirtualHost *:80> ServerName localhost ServerAlias localhost DocumentRoot /home/vmcilwain/www/site/public </VirtualHost> sudo a2ensite site sudo a2enmod rewrite sudo service apache2 reload Attempted to hit the application with the browser (http://localhost) and I get: It Works! (Apache standard page) Attempt to hit the application with the location http://localhost/site and I get: Not Found The requested URL /site was not found on this server According to the guide, I should have seen the welcome aboard page of the site application in my www directory. I can''t be this hopeless, what else can I be doing wrong :-/ Any help again is greatly appreciated. On Dec 14, 3:10 am, mg1313 <mirceag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Try the documentation from here:http://www.mirceagoia.com/2011/11/ruby-on-rails-installation-ubuntu-l... > > Mircea > > On Dec 13, 10:52 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > Hello all, > > > Can anyone point me to any solid documentation on how to set up a > > production server using RVM, Passenger, and Apache2? I have been at > > this for a week with absolutely no luck at all so I thought I would > > post here to see if anyone has managed to get this to work and written > > down the steps they used. > > > Right now with my current implementation, I am getting a 404 error > > when I attempt to locally point my browser to a basic rails > > application. > > > I am attempting to set this up on an Ubuntu 11.10 system. > > > Any help would be greatly appreciated. > > > Thanks in advance.-- 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Vell
2011-Dec-15 18:01 UTC
Re: How can I get RVM/Passenger/Apache2 to play nicely together
Brynjolfu, Thanks, I will also give this a shot. I have to think there is just something fundamentally wrong that every installing attempt has failed. All of the steps look pretty straight forward yet I am not having any kind of success. On Dec 15, 2:29 am, Brynjolfur Thorvardsson <bi...-6eh5JQIm30aHXe+LvDLADg@public.gmane.org> wrote:> Hi Vell > > Doing a reinstall might well save you a lot of hassle. In my last install I used sudo all the way through (the server is a test server for an eventual production server) and no RVM since I was only going to use Ruby 1.9.2 (like you). I wrote down all the steps during the install and this "recipe" works well enough for me. Note that all apt-get installs use sudo, no doubt there are some places where that was unnecessary - but I couldn''t be bothered to find out. The server also has Asterisk installed, you probably don''t need that so I''ve commented out those lines that are Asterisk specific (with ##) but left them in the recipe anyway: > > During install, Ubuntu 11.10, following packages selected: > OpenSSH server > LAMP server > > $sudo visudo > ##added last line: > <my user name> ALL=(ALL) NOPASSWD: ALL > > $sudo apt-get update > $sudo apt-get upgrade > > ##$sudo apt-get install asterisk sox asterisk-mysql asterisk-mp3 > > $sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion > > $sudo apt-get install ruby1.9.2 > $ruby -v > >ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux] > $gem -v > >1.3.7 > > $sudo gem update > > $sudo env REALLY_GEM_UPDATE_SYSTEM=1 gem update --system > $gem -v > >1.8.12 > $sudo apt-get install ruby1.9.1-dev > ##see:http://rbjl.net/20-rubybuntu-2-troubleshooting-common-ruby-ubuntu-pro... > > $sudo gem install rails -v=3.1.0 > $rails -v > >Rails 3.1.0 > $rake --version > >rake, version 0.9.2 > > $sudo gem install passenger > $sudo passenger-install-apache2-module > $sudo apt-get install libcurl4-openssl-dev > $sudo apt-get install apache2-prefork-dev > $sudo apt-get install libapr1-dev > $sudo passenger-install-apache2-module > > $sudo vim /etc/apache2/apache2.conf > ##Added these lines at bottom of file: > > LoadModule passenger_module /usr/lib/ruby/gems/1.9.1/gems/passenger3.0.11/ext/apache2/mod_passenger.so > PassengerRoot /usr/lib/ruby/gems/1.9.1/gems/passenger-3.0.11 > PassengerRuby /usr/bin/ruby1.9.1 > > $sudo service apache2 restart > > ##$sudo gem install adhearsion > ##$ahn -v > ## >Adhearsion v1.2.3 > > $sudo apt-get install phpmyadmin > > ##Install java runtime: > > $sudo apt-get install python-software-properties > $sudo add-apt-repository ppa:chris-lea/node.js > $sudo apt-get update > $sudo apt-get install nodejs > > ##### END install - and everything works fine ##### > > -----Oprindelig meddelelse----- > Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk@googlegroups.com] På vegne af Vell > Sendt: 15. december 2011 06:06 > Til: Ruby on Rails: Talk > Emne: [Rails] Re: How can I get RVM/Passenger/Apache2 to play nicely together > > Ok so I tried using the scenario that the phusion blog wrote out but I > am still getting a permission denied. I have a freshly installed > ubuntu 11.10 system so now I am sure that whats going on is related to > one install and not several different install attempts. SOOOO here is > what I have. > > Reference Tutorial:http://www.google.com/url?sa=D&q=http://blog.phusion.nl/2010/09/21/ph... > > The difference I did from this tutorial is that I wanted rails 1.9.2 > to be the default since I won''t be running any 1.8.7 apps. > > Install goes as follows: > 1. Installed rvm (single user) > -- For whatever reason when installed multi-user I was not able to > load rvm into my terminal after logging in/out > 2. Installed ruby 1.9.2 > -- rvm install 1.9.2 > 3. Made 1.9.2 the default > -- rvm --default use 1.9.2 > > 4. Added the following to /etc/apache2/apache2.conf: > > LoadModule passenger_module /home/vmcilwain/.rvm/gems/ruby-1.9.2-p290/ > gems/passenger-3.0.11/ext/apache2/mod_passenger.so > PassengerRoot /home/vmcilwain/.rvm/gems/ruby-1.9.2-p290/gems/ > passenger-3.0.11 > PassengerRuby /home/vmcilwain/.rvm/wrappers/ruby-1.9.2-p290/ruby > > <VirtualHost *:80> > ServerName vmcilwain-dell > DocumentRoot /home/vmcilwain/sites/vell > </VirtualHost> > > Unfortunately for some reason I am not able get to rubygems.org or > github.com so I am not able to run bundle to get all of the necessary > gems installed. I get the following error: > Fetching source index forhttp://rubygems.org/ > Fetching source index forhttp://github.com/ > Could not reach rubygems repositoryhttp://rubygems.org/,http://github.com/ > > The weird thing is that I am able to ping both domains. Also when I > create a brand new rails app bundle runs fine so I am curious about > what it does not like about my Gemfile this time around that it had no > problem with the last 5 times I have run it for that particular app. > > With the fresh rails app that I have just created I am not able to > create the database using rake db create it is also giving me an > error: > > vmcilwain@vmcilwain--D610:~/vell_new$ bundle exec rake db:create > rake aborted! > Could not find a JavaScript runtime. Seehttps://github.com/sstephenson/execjs > for a list of available runtimes. > > (See full trace by running task with --trace) > > I do have gem ''execjs'' in my Gemfile so I am not sure exactly what I > am doing wrong in this case either. > > On Dec 14, 2:35 pm, Jeff Lewis <jeff.bu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > Hi Vell, > > > Once you figure out that apache vhost path / read issue on your new > > setup, .... > > > If you''re using passenger and you''re running rvm, then you''re likely > > using (or will use) different rubies and/or gemsets for projects on a > > given machine. If so, then you might want to consider using passenger- > > standalone instead of passenger-apache-module: > > >http://www.modrails.com/documentation/Users%20guide%20Standalone.html > > > The main benefit of running passenger-standalone is that you can run > > multiple projects that use diff rubies/gemsets from the same apache (/ > > nginx/...). Here''s an example setup from the phusion folks: > > >http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-... > > > I''ve been using passenger-standalone in production for over a year now > > on a number of projects, and it works well. Those clients that use > > passenger no longer use passenger-module and instead just use proxy''d > > passenger-standalone for both their dev and prod envs. > > > Here''s an example of the setup on a local dev instance for a given rvm > > passenger-standalone project where I typically maintain an rvm gemset > > per project: > > > ####### localhost subdomain for the proj: > > $ cat /etc/hosts > > ... > > 127.0.0.1 foo.localhost > > ... > > > ###### vhost conf for the proj: > > > $ cat /etc/apache2/sites-available/foo.conf > > ####http://foo.localhost/ > > <VirtualHost *:80> > > ServerName foo.localhost > > DocumentRoot /path/to/foo/public > > <Directory /path/to/foo/public> > > AllowOverride all > > Options -MultiViews > > </Directory> > > > ProxyRequests Off > > <Proxy *> > > Order deny,allow > > Deny from all > > Allow from 127.0.0.1 > > </Proxy> > > ProxyPass /http://127.0.0.1:3044/ > > ProxyPassReverse /http://127.0.0.1:3044/ > > RewriteEngine On > > RewriteCond %{LA-U:REMOTE_USER} (.+) > > RewriteRule . - [E=RU:%1] > > RequestHeader add X-Forwarded-User %{RU}e > > ProxyPreserveHost on > > > CustomLog /var/log/apache2/foo_access_log combined > > ErrorLog /var/log/apache2/foo_error_log > > > ErrorDocument 503 "<!DOCTYPE html><html><head><meta http- > > equiv=''Content-Type'' content=''text/html; charset=UTF-8'' /><title>Foo > > Service Is Temporarily Unavailable (503)</title></head><body><h2>Foo > > Service Is Temporarily Unavailable (503)</h2><p>The Foo service is > > temporarily unable to process your request due to maintenance > > downtime.</p><p>Thanks for your patience. Please try again later.</p></ > > body></html>" > > > </VirtualHost> > > > ###### I usually have a custom script to > > ###### manage rails env server for proj: > > > $ pwd > > /path/to/foo > > > $ cat ./script/foo_env_server.rb > > ### > > ### foo_env_server.rb is used to start/stop/restart/status the foo > > env. > > ### > > ### Usage: $ ruby ./script/foo_env_server.rb ENV ACTION > > ### ENV : development or production > > ### ACTION : start, stop, restart or status > > ### > > ### Note: currently serving foo rails app using passenger-standalone > > ### proxy''d via apache. > > ### > > > APP_NAME = "foo" > > DEV_PORT = 3044 > > PROD_PORT = 8044 > > > PROJ_ROOT = File.expand_path("#{File.dirname(__FILE__)}/..") > > DEV_ENV = "development" > > PROD_ENV = "production" > > ENVS = [ DEV_ENV, PROD_ENV ] > > LOG_FNAMES = { DEV_ENV=>"#{PROJ_ROOT}/log/#{DEV_ENV}.log", > > PROD_ENV=>"#{PROJ_ROOT}/log/#{PROD_ENV}.log" } > > PID_FNAMES = { DEV_ENV=>"#{PROJ_ROOT}/tmp/pid/#{DEV_ENV}-passenger- > > #{DEV_PORT}.pid", PROD_ENV=>"#{PROJ_ROOT}/tmp/pid/#{PROD_ENV}- > > passenger-#{PROD_PORT}.pid" } > > PORTS = { DEV_ENV=>DEV_PORT, PROD_ENV=>PROD_PORT } > > ACTIONS = [ ''status'', ''start'', ''stop'', ''restart'' ] > > ... > > > def start(env) > > port = PORTS[env] > > pid_fname = PID_FNAMES[env] > > log_fname = LOG_FNAMES[env] > > ... > > # start env server. > > res = `passenger start --port #{port} --environment #{env} --log- > > file #{log_fname} --pid-file #{pid_fname} --daemonize 2>&1`.strip > > ... > > end > > ... > > > $ rvm 1.9.2@foo && ruby ./script/foo_env_server.rb development restart > > ... > > foo development env on port 3044: started: pid = 26797 (saved to / > > path/to/foo/tmp/pid/development-passenger-3044.pid) > > > ###### test serving static content?: > > > $ echo "hi from static foo" > ./public/foo.txt && curl -sihttp://foo.localhost/foo.txt&&rm ./public/foo.txt > > HTTP/1.1 200 OK > > ... > > hi from static foo > > > ###### test serving dynamic content?: > > > $ cat ./config/routes.rb > > ... > > match ''/ping'' => ''misc#ping'', :via => [:get] > > ... > > > $ cat ./app/controllers/misc_controller.rb > > ... > > def ping > > render(:text=>"1\n") > > end > > ... > > > $ curl -sihttp://foo.localhost/ping > > HTTP/1.1 200 OK > > ... > > 1 > > > Another general benefit of this type of proxy''d setup is that if you > > or your client decides they want to test / use a diff rails app server > > for the proj, > > ... > > read more »-- 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2011-Dec-15 18:41 UTC
Re: Re: How can I get RVM/Passenger/Apache2 to play nicely together
On 15 Dec 2011, at 17:54, Vell <lovell.mcilwain-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > rails new site -d mysql > > Added the following to /etc/apache2/sites-available/site > <VirtualHost *:80> > ServerName localhost > ServerAlias localhost > DocumentRoot /home/vmcilwain/www/site/public > </VirtualHost> > > sudo a2ensite site > > sudo a2enmod rewrite > > sudo service apache2 reload > > Attempted to hit the application with the browser (http://localhost) > and I get: It Works! (Apache standard page) > Attempt to hit the application with the location http://localhost/site > and I get: Not Found The requested URL /site was not found on this > server > > According to the guide, I should have seen the welcome aboard page of > the site application in my www directory. >Actually, with the setup you''ve got the rails app should be available at http://localhost (you have to add extra stuff to mount a rails app in a subdirectories) Do you already have other sites hosted on this machine? Sounds like a different virtual host file (which is just serving up the stock apache page) is taking precedence. With your setup you''ll also need to ensure that both the app is readable by apache as well as all the rvm installed files Fred> I can''t be this hopeless, what else can I be doing wrong :-/ Any help > again is greatly appreciated. > > On Dec 14, 3:10 am, mg1313 <mirceag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> Try the documentation from here:http://www.mirceagoia.com/2011/11/ruby-on-rails-installation-ubuntu-l... >> >> Mircea >> >> On Dec 13, 10:52 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> >> >> >> >> >> >>> Hello all, >> >>> Can anyone point me to any solid documentation on how to set up a >>> production server using RVM, Passenger, and Apache2? I have been at >>> this for a week with absolutely no luck at all so I thought I would >>> post here to see if anyone has managed to get this to work and written >>> down the steps they used. >> >>> Right now with my current implementation, I am getting a 404 error >>> when I attempt to locally point my browser to a basic rails >>> application. >> >>> I am attempting to set this up on an Ubuntu 11.10 system. >> >>> Any help would be greatly appreciated. >> >>> Thanks in advance. > > -- > 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Vell
2011-Dec-15 18:59 UTC
Re: How can I get RVM/Passenger/Apache2 to play nicely together
There aren''t any other sites defined on this box. It is a fresh install with nothing done to it aside from this latest attempt. I would think that RVM has access to my files in my home directory since it is installed under my account. As far as apache goes, it is running as www-data. Is it that I just need to add www-data to the vmcilwain group? or should I just make the app itself world readable to make it simple? On Dec 15, 1:41 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 15 Dec 2011, at 17:54, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > > > > > rails new site -d mysql > > > Added the following to /etc/apache2/sites-available/site > > <VirtualHost *:80> > > ServerName localhost > > ServerAlias localhost > > DocumentRoot /home/vmcilwain/www/site/public > > </VirtualHost> > > > sudo a2ensite site > > > sudo a2enmod rewrite > > > sudo service apache2 reload > > > Attempted to hit the application with the browser (http://localhost) > > and I get: It Works! (Apache standard page) > > Attempt to hit the application with the location http://localhost/site > > and I get: Not Found The requested URL /site was not found on this > > server > > > According to the guide, I should have seen the welcome aboard page of > > the site application in my www directory. > > Actually, with the setup you''ve got the rails app should be available athttp://localhost(you have to add extra stuff to mount a rails app in a subdirectories) > > Do you already have other sites hosted on this machine? Sounds like a different virtual host file (which is just serving up the stock apache page) is taking precedence. > With your setup you''ll also need to ensure that both the app is readable by apache as well as all the rvm installed files > > Fred > > > > > > > > > I can''t be this hopeless, what else can I be doing wrong :-/ Any help > > again is greatly appreciated. > > > On Dec 14, 3:10 am, mg1313 <mirceag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> Try the documentation from here:http://www.mirceagoia.com/2011/11/ruby-on-rails-installation-ubuntu-l... > > >> Mircea > > >> On Dec 13, 10:52 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > >>> Hello all, > > >>> Can anyone point me to any solid documentation on how to set up a > >>> production server using RVM, Passenger, and Apache2? I have been at > >>> this for a week with absolutely no luck at all so I thought I would > >>> post here to see if anyone has managed to get this to work and written > >>> down the steps they used. > > >>> Right now with my current implementation, I am getting a 404 error > >>> when I attempt to locally point my browser to a basic rails > >>> application. > > >>> I am attempting to set this up on an Ubuntu 11.10 system. > > >>> Any help would be greatly appreciated. > > >>> Thanks in advance. > > > -- > > 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2011-Dec-15 19:05 UTC
Re: Re: How can I get RVM/Passenger/Apache2 to play nicely together
On 15 Dec 2011, at 18:59, Vell <lovell.mcilwain-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> There aren''t any other sites defined on this box. It is a fresh > install with nothing done to it aside from this latest attempt. I > would think that RVM has access to my files in my home directory since > it is installed under my account. As far as apache goes, it is running > as www-data. Is it that I just need to add www-data to the vmcilwain > group? or should I just make the app itself world readable to make it > simple?Clearly there is another virtual host file somewhere, since that welcome to apache file must be coming from somewhere. Probably also worth checking that the symlinks from sites-enabled are ok (I assume that''s what a2ensite does - I''m not familiar with that particular way of managing apache.) Apache will need to be able to read the rvm files and the app files. The simplest thing to do in the short term would be to make them both world readable Fred> > On Dec 15, 1:41 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: >> On 15 Dec 2011, at 17:54, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> >> >> >> >> >> >> >> >> >> >>> rails new site -d mysql >> >>> Added the following to /etc/apache2/sites-available/site >>> <VirtualHost *:80> >>> ServerName localhost >>> ServerAlias localhost >>> DocumentRoot /home/vmcilwain/www/site/public >>> </VirtualHost> >> >>> sudo a2ensite site >> >>> sudo a2enmod rewrite >> >>> sudo service apache2 reload >> >>> Attempted to hit the application with the browser (http://localhost) >>> and I get: It Works! (Apache standard page) >>> Attempt to hit the application with the location http://localhost/site >>> and I get: Not Found The requested URL /site was not found on this >>> server >> >>> According to the guide, I should have seen the welcome aboard page of >>> the site application in my www directory. >> >> Actually, with the setup you''ve got the rails app should be available athttp://localhost(you have to add extra stuff to mount a rails app in a subdirectories) >> >> Do you already have other sites hosted on this machine? Sounds like a different virtual host file (which is just serving up the stock apache page) is taking precedence. >> With your setup you''ll also need to ensure that both the app is readable by apache as well as all the rvm installed files >> >> Fred >> >> >> >> >> >> >> >>> I can''t be this hopeless, what else can I be doing wrong :-/ Any help >>> again is greatly appreciated. >> >>> On Dec 14, 3:10 am, mg1313 <mirceag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>> Try the documentation from here:http://www.mirceagoia.com/2011/11/ruby-on-rails-installation-ubuntu-l... >> >>>> Mircea >> >>>> On Dec 13, 10:52 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >>>>> Hello all, >> >>>>> Can anyone point me to any solid documentation on how to set up a >>>>> production server using RVM, Passenger, and Apache2? I have been at >>>>> this for a week with absolutely no luck at all so I thought I would >>>>> post here to see if anyone has managed to get this to work and written >>>>> down the steps they used. >> >>>>> Right now with my current implementation, I am getting a 404 error >>>>> when I attempt to locally point my browser to a basic rails >>>>> application. >> >>>>> I am attempting to set this up on an Ubuntu 11.10 system. >> >>>>> Any help would be greatly appreciated. >> >>>>> Thanks in advance. >> >>> -- >>> 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Vell
2011-Dec-15 19:35 UTC
Re: How can I get RVM/Passenger/Apache2 to play nicely together
So there are 2 other files that are in the sites-available directory. - default - default-ssl I changed the name of the of the file called site to default in the sites-available directory and restarted apache and that was still no luck. I also moved the site application into /var/www and www-data the owner /var/www/*. Changed the location of RootDocument in the site file in sites-available and still no luck. I am not sure how to make my .rvm directory readable to the rest of my system without making my entire home directory readable to the entire system. I assume that is not a good idea. On Dec 15, 2:05 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 15 Dec 2011, at 18:59, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > There aren''t any other sites defined on this box. It is a fresh > > install with nothing done to it aside from this latest attempt. I > > would think that RVM has access to my files in my home directory since > > it is installed under my account. As far as apache goes, it is running > > as www-data. Is it that I just need to add www-data to the vmcilwain > > group? or should I just make the app itself world readable to make it > > simple? > > Clearly there is another virtual host file somewhere, since that welcome to apache file must be coming from somewhere. Probably also worth checking that the symlinks from sites-enabled are ok (I assume that''s what a2ensite does - I''m not familiar with that particular way of managing apache.) > > Apache will need to be able to read the rvm files and the app files. The simplest thing to do in the short term would be to make them both world readable > > Fred > > > > > > > > > > > On Dec 15, 1:41 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > wrote: > >> On 15 Dec 2011, at 17:54, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > >>> rails new site -d mysql > > >>> Added the following to /etc/apache2/sites-available/site > >>> <VirtualHost *:80> > >>> ServerName localhost > >>> ServerAlias localhost > >>> DocumentRoot /home/vmcilwain/www/site/public > >>> </VirtualHost> > > >>> sudo a2ensite site > > >>> sudo a2enmod rewrite > > >>> sudo service apache2 reload > > >>> Attempted to hit the application with the browser (http://localhost) > >>> and I get: It Works! (Apache standard page) > >>> Attempt to hit the application with the location http://localhost/site > >>> and I get: Not Found The requested URL /site was not found on this > >>> server > > >>> According to the guide, I should have seen the welcome aboard page of > >>> the site application in my www directory. > > >> Actually, with the setup you''ve got the rails app should be available athttp://localhost(youhave to add extra stuff to mount a rails app in a subdirectories) > > >> Do you already have other sites hosted on this machine? Sounds like a different virtual host file (which is just serving up the stock apache page) is taking precedence. > >> With your setup you''ll also need to ensure that both the app is readable by apache as well as all the rvm installed files > > >> Fred > > >>> I can''t be this hopeless, what else can I be doing wrong :-/ Any help > >>> again is greatly appreciated. > > >>> On Dec 14, 3:10 am, mg1313 <mirceag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >>>> Try the documentation from here:http://www.mirceagoia.com/2011/11/ruby-on-rails-installation-ubuntu-l... > > >>>> Mircea > > >>>> On Dec 13, 10:52 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > >>>>> Hello all, > > >>>>> Can anyone point me to any solid documentation on how to set up a > >>>>> production server using RVM, Passenger, and Apache2? I have been at > >>>>> this for a week with absolutely no luck at all so I thought I would > >>>>> post here to see if anyone has managed to get this to work and written > >>>>> down the steps they used. > > >>>>> Right now with my current implementation, I am getting a 404 error > >>>>> when I attempt to locally point my browser to a basic rails > >>>>> application. > > >>>>> I am attempting to set this up on an Ubuntu 11.10 system. > > >>>>> Any help would be greatly appreciated. > > >>>>> Thanks in advance. > > >>> -- > >>> 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-talk-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm. > >>> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > >>> 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Brynjolfur Thorvardsson
2011-Dec-15 19:37 UTC
SV: Re: How can I get RVM/Passenger/Apache2 to play nicely together
Vell, with your setup as far as I can see, you can without changing the apache site and localhost files at all. You can create a symbolic link from your /var/www directory to your Rails directory, something along these lines: $sudo ln -s /home/vmcilwain/www/site/public /var/www/site Now, if you go to http://localhost/site you should get your Rails site up. Of course, it is different if you want to be able to get your site to answer to http://localhost directly. One way I have achieved this is to edit /etc/apache2/sites-available/default (only change is at top, DocumentRoot, and removing the <directory /var/www> section which isn''t really necessary): <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /home/binni/mysite/public <Directory /> Options FollowSymLinks AllowOverride None </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> </VirtualHost> -----Oprindelig meddelelse----- Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk@googlegroups.com] På vegne af Vell Sendt: 15. december 2011 18:55 Til: Ruby on Rails: Talk Emne: [Rails] Re: How can I get RVM/Passenger/Apache2 to play nicely together Mircea, I tried this installation guide just now and I am still in the same place. Though the instructions are clear, I am still not able to get to my rails application that is located in my home directory. This is on a fresh installed Ubuntu 11.10 system as well. So here is what has been done, based on that guide: RVM Steup sudo aptitude install build-essential git-core curl bash < <(curl -s https://rvm.beginrescueend.com/install/rvm) echo ''[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/ rvm"'' >> ~/.bashrc rvm notes sudo aptitude install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev zlib libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2- dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison rvm install 1.9.2 rvm use 1.9.2 rvm --default use 1.9.2 RAILS SETUP 1 gem install rails Added the following to my Gemfile gem ''execjs'' gem ''therubyracer'' bundle install rails s (saw my application locally on port 3000) APACHE2 Setup sudo aptitude install apache2 Passenger Setup gem install passenger passenger-install-apache2-module Added the following to /etc/apache2/apache2.conf LoadModule passenger_module /home/user/.rvm/gems/ruby-1.9.2- p290/gems/ passenger-3.0.11/ext/apache2/mod_passenger.so PassengerRoot /home/user/.rvm/gems/ruby-1.9.2-p290/gems/ passenger-3.0.11 PassengerRuby /home/user/.rvm/wrappers/ruby-1.9.2-p290/ restarted apache2 Creating My Site Created directory www in my home directory rails new site -d mysql Added the following to /etc/apache2/sites-available/site <VirtualHost *:80> ServerName localhost ServerAlias localhost DocumentRoot /home/vmcilwain/www/site/public </VirtualHost> sudo a2ensite site sudo a2enmod rewrite sudo service apache2 reload Attempted to hit the application with the browser (http://localhost) and I get: It Works! (Apache standard page) Attempt to hit the application with the location http://localhost/site and I get: Not Found The requested URL /site was not found on this server According to the guide, I should have seen the welcome aboard page of the site application in my www directory. I can''t be this hopeless, what else can I be doing wrong :-/ Any help again is greatly appreciated. On Dec 14, 3:10 am, mg1313 <mirceag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Try the documentation from here:http://www.mirceagoia.com/2011/11/ruby-on-rails-installation-ubuntu-l... > > Mircea > > On Dec 13, 10:52 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > Hello all, > > > Can anyone point me to any solid documentation on how to set up a > > production server using RVM, Passenger, and Apache2? I have been at > > this for a week with absolutely no luck at all so I thought I would > > post here to see if anyone has managed to get this to work and > > written down the steps they used. > > > Right now with my current implementation, I am getting a 404 error > > when I attempt to locally point my browser to a basic rails > > application. > > > I am attempting to set this up on an Ubuntu 11.10 system. > > > Any help would be greatly appreciated. > > > Thanks in advance.-- 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Vell
2011-Dec-15 19:57 UTC
Re: How can I get RVM/Passenger/Apache2 to play nicely together
Brynjolfur, Setting up a sym link seems to have done the trick. Pointing that to my www directory in my home directory seems to have done the trick. I have also set the www directory in my home directory to be read/ write by "other" as well. Once I took my browser to http://llocalhost/site everything came up fine. I don''t recall changing any permissions to my .rvm directory in my home directory. So now that I know that that works, I will try this process all over again to make sure I have the steps down right. I would like to thank you all for being patient with me as I try to get all of this working. On Dec 15, 2:37 pm, Brynjolfur Thorvardsson <bi...-6eh5JQIm30aHXe+LvDLADg@public.gmane.org> wrote:> Vell, with your setup as far as I can see, you can without changing the apache site and localhost files at all. > > You can create a symbolic link from your /var/www directory to your Rails directory, something along these lines: > > $sudo ln -s /home/vmcilwain/www/site/public /var/www/site > > Now, if you go tohttp://localhost/siteyou should get your Rails site up. > > Of course, it is different if you want to be able to get your site to answer tohttp://localhostdirectly. One way I have achieved this is to edit /etc/apache2/sites-available/default (only change is at top, DocumentRoot, and removing the <directory /var/www> section which isn''t really necessary): > > <VirtualHost *:80> > ServerAdmin webmaster@localhost > > DocumentRoot /home/binni/mysite/public > <Directory /> > Options FollowSymLinks > AllowOverride None > </Directory> > ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ > <Directory "/usr/lib/cgi-bin"> > AllowOverride None > Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch > Order allow,deny > Allow from all > </Directory> > ErrorLog ${APACHE_LOG_DIR}/error.log > > # Possible values include: debug, info, notice, warn, error, crit, > # alert, emerg. > LogLevel warn > > CustomLog ${APACHE_LOG_DIR}/access.log combined > > Alias /doc/ "/usr/share/doc/" > <Directory "/usr/share/doc/"> > Options Indexes MultiViews FollowSymLinks > AllowOverride None > Order deny,allow > Deny from all > Allow from 127.0.0.0/255.0.0.0 ::1/128 > </Directory> > > </VirtualHost> > > -----Oprindelig meddelelse----- > Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk@googlegroups.com] På vegne af Vell > Sendt: 15. december 2011 18:55 > Til: Ruby on Rails: Talk > Emne: [Rails] Re: How can I get RVM/Passenger/Apache2 to play nicely together > > Mircea, > > I tried this installation guide just now and I am still in the same place. Though the instructions are clear, I am still not able to get to my rails application that is located in my home directory. This is on a fresh installed Ubuntu 11.10 system as well. So here is what has been done, based on that guide: > > RVM Steup > sudo aptitude install build-essential git-core curl > > bash < <(curl -shttps://rvm.beginrescueend.com/install/rvm) > > echo ''[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/ rvm"'' >> ~/.bashrc > > rvm notes > > sudo aptitude install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev zlib libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2- dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison > > rvm install 1.9.2 > > rvm use 1.9.2 > > rvm --default use 1.9.2 > > RAILS SETUP 1 > gem install rails > > Added the following to my Gemfile > gem ''execjs'' > gem ''therubyracer'' > > bundle install > > rails s (saw my application locally on port 3000) > > APACHE2 Setup > > sudo aptitude install apache2 > > Passenger Setup > > gem install passenger > > passenger-install-apache2-module > > Added the following to /etc/apache2/apache2.conf LoadModule passenger_module /home/user/.rvm/gems/ruby-1.9.2- p290/gems/ passenger-3.0.11/ext/apache2/mod_passenger.so > PassengerRoot /home/user/.rvm/gems/ruby-1.9.2-p290/gems/ > passenger-3.0.11 > PassengerRuby /home/user/.rvm/wrappers/ruby-1.9.2-p290/ > > restarted apache2 > > Creating My Site > > Created directory www in my home directory > > rails new site -d mysql > > Added the following to /etc/apache2/sites-available/site <VirtualHost *:80> ServerName localhost ServerAlias localhost DocumentRoot /home/vmcilwain/www/site/public </VirtualHost> > > sudo a2ensite site > > sudo a2enmod rewrite > > sudo service apache2 reload > > Attempted to hit the application with the browser (http://localhost) and I get: It Works! (Apache standard page) Attempt to hit the application with the location http://localhost/siteand I get: Not Found The requested URL /site was not found on this server > > According to the guide, I should have seen the welcome aboard page of the site application in my www directory. > > I can''t be this hopeless, what else can I be doing wrong :-/ Any help again is greatly appreciated. > > On Dec 14, 3:10 am, mg1313 <mirceag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > > > Try the documentation from here:http://www.mirceagoia.com/2011/11/ruby-on-rails-installation-ubuntu-l... > > > Mircea > > > On Dec 13, 10:52 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Hello all, > > > > Can anyone point me to any solid documentation on how to set up a > > > production server using RVM, Passenger, and Apache2? I have been at > > > this for a week with absolutely no luck at all so I thought I would > > > post here to see if anyone has managed to get this to work and > > > written down the steps they used. > > > > Right now with my current implementation, I am getting a 404 error > > > when I attempt to locally point my browser to a basic rails > > > application. > > > > I am attempting to set this up on an Ubuntu 11.10 system. > > > > Any help would be greatly appreciated. > > > > Thanks in advance. > > -- > 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Vell
2011-Dec-15 20:38 UTC
Re: How can I get RVM/Passenger/Apache2 to play nicely together
Hmm one more question before I call this a complete success, I just tried to create a new scaffold but it looks like I continue to get the welcome board page of my app. Is this because my sym link is only pointing at public? I removed the index.html file from the application and created a model called "me": bundle exec rails generate scaffold me email:string bundle exec rake:migrate when I then try to go to http://localhost/mes I get the requested URL / site/mes was not found. On Dec 15, 2:37 pm, Brynjolfur Thorvardsson <bi...-6eh5JQIm30aHXe+LvDLADg@public.gmane.org> wrote:> Vell, with your setup as far as I can see, you can without changing the apache site and localhost files at all. > > You can create a symbolic link from your /var/www directory to your Rails directory, something along these lines: > > $sudo ln -s /home/vmcilwain/www/site/public /var/www/site > > Now, if you go tohttp://localhost/siteyou should get your Rails site up. > > Of course, it is different if you want to be able to get your site to answer tohttp://localhostdirectly. One way I have achieved this is to edit /etc/apache2/sites-available/default (only change is at top, DocumentRoot, and removing the <directory /var/www> section which isn''t really necessary): > > <VirtualHost *:80> > ServerAdmin webmaster@localhost > > DocumentRoot /home/binni/mysite/public > <Directory /> > Options FollowSymLinks > AllowOverride None > </Directory> > ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ > <Directory "/usr/lib/cgi-bin"> > AllowOverride None > Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch > Order allow,deny > Allow from all > </Directory> > ErrorLog ${APACHE_LOG_DIR}/error.log > > # Possible values include: debug, info, notice, warn, error, crit, > # alert, emerg. > LogLevel warn > > CustomLog ${APACHE_LOG_DIR}/access.log combined > > Alias /doc/ "/usr/share/doc/" > <Directory "/usr/share/doc/"> > Options Indexes MultiViews FollowSymLinks > AllowOverride None > Order deny,allow > Deny from all > Allow from 127.0.0.0/255.0.0.0 ::1/128 > </Directory> > > </VirtualHost> > > -----Oprindelig meddelelse----- > Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk@googlegroups.com] På vegne af Vell > Sendt: 15. december 2011 18:55 > Til: Ruby on Rails: Talk > Emne: [Rails] Re: How can I get RVM/Passenger/Apache2 to play nicely together > > Mircea, > > I tried this installation guide just now and I am still in the same place. Though the instructions are clear, I am still not able to get to my rails application that is located in my home directory. This is on a fresh installed Ubuntu 11.10 system as well. So here is what has been done, based on that guide: > > RVM Steup > sudo aptitude install build-essential git-core curl > > bash < <(curl -shttps://rvm.beginrescueend.com/install/rvm) > > echo ''[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/ rvm"'' >> ~/.bashrc > > rvm notes > > sudo aptitude install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev zlib libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2- dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison > > rvm install 1.9.2 > > rvm use 1.9.2 > > rvm --default use 1.9.2 > > RAILS SETUP 1 > gem install rails > > Added the following to my Gemfile > gem ''execjs'' > gem ''therubyracer'' > > bundle install > > rails s (saw my application locally on port 3000) > > APACHE2 Setup > > sudo aptitude install apache2 > > Passenger Setup > > gem install passenger > > passenger-install-apache2-module > > Added the following to /etc/apache2/apache2.conf LoadModule passenger_module /home/user/.rvm/gems/ruby-1.9.2- p290/gems/ passenger-3.0.11/ext/apache2/mod_passenger.so > PassengerRoot /home/user/.rvm/gems/ruby-1.9.2-p290/gems/ > passenger-3.0.11 > PassengerRuby /home/user/.rvm/wrappers/ruby-1.9.2-p290/ > > restarted apache2 > > Creating My Site > > Created directory www in my home directory > > rails new site -d mysql > > Added the following to /etc/apache2/sites-available/site <VirtualHost *:80> ServerName localhost ServerAlias localhost DocumentRoot /home/vmcilwain/www/site/public </VirtualHost> > > sudo a2ensite site > > sudo a2enmod rewrite > > sudo service apache2 reload > > Attempted to hit the application with the browser (http://localhost) and I get: It Works! (Apache standard page) Attempt to hit the application with the location http://localhost/siteand I get: Not Found The requested URL /site was not found on this server > > According to the guide, I should have seen the welcome aboard page of the site application in my www directory. > > I can''t be this hopeless, what else can I be doing wrong :-/ Any help again is greatly appreciated. > > On Dec 14, 3:10 am, mg1313 <mirceag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > > > Try the documentation from here:http://www.mirceagoia.com/2011/11/ruby-on-rails-installation-ubuntu-l... > > > Mircea > > > On Dec 13, 10:52 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Hello all, > > > > Can anyone point me to any solid documentation on how to set up a > > > production server using RVM, Passenger, and Apache2? I have been at > > > this for a week with absolutely no luck at all so I thought I would > > > post here to see if anyone has managed to get this to work and > > > written down the steps they used. > > > > Right now with my current implementation, I am getting a 404 error > > > when I attempt to locally point my browser to a basic rails > > > application. > > > > I am attempting to set this up on an Ubuntu 11.10 system. > > > > Any help would be greatly appreciated. > > > > Thanks in advance. > > -- > 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Vell
2011-Dec-15 20:47 UTC
Re: How can I get RVM/Passenger/Apache2 to play nicely together
Nevermind, my sym link was pointing to an old directory that had the same application name which was the test to see if it was working using localhost 3000. So at this point When I set up the sym link correctly and I hit the location with a browser, I am getting a list of the contents of public. Maybe that is the intended behavior until I recreate my basic scaffold. On Dec 15, 3:38 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hmm one more question before I call this a complete success, I just > tried to create a new scaffold but it looks like I continue to get the > welcome board page of my app. Is this because my sym link is only > pointing at public? > > I removed the index.html file from the application and created a model > called "me": > > bundle exec rails generate scaffold me email:string > bundle exec rake:migrate > > when I then try to go tohttp://localhost/mesI get the requested URL / > site/mes was not found. > > On Dec 15, 2:37 pm, Brynjolfur Thorvardsson <bi...-6eh5JQIm30aHXe+LvDLADg@public.gmane.org> wrote: > > > > > > > > > Vell, with your setup as far as I can see, you can without changing the apache site and localhost files at all. > > > You can create a symbolic link from your /var/www directory to your Rails directory, something along these lines: > > > $sudo ln -s /home/vmcilwain/www/site/public /var/www/site > > > Now, if you go tohttp://localhost/siteyoushould get your Rails site up. > > > Of course, it is different if you want to be able to get your site to answer tohttp://localhostdirectly. One way I have achieved this is to edit /etc/apache2/sites-available/default (only change is at top, DocumentRoot, and removing the <directory /var/www> section which isn''t really necessary): > > > <VirtualHost *:80> > > ServerAdmin webmaster@localhost > > > DocumentRoot /home/binni/mysite/public > > <Directory /> > > Options FollowSymLinks > > AllowOverride None > > </Directory> > > ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ > > <Directory "/usr/lib/cgi-bin"> > > AllowOverride None > > Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch > > Order allow,deny > > Allow from all > > </Directory> > > ErrorLog ${APACHE_LOG_DIR}/error.log > > > # Possible values include: debug, info, notice, warn, error, crit, > > # alert, emerg. > > LogLevel warn > > > CustomLog ${APACHE_LOG_DIR}/access.log combined > > > Alias /doc/ "/usr/share/doc/" > > <Directory "/usr/share/doc/"> > > Options Indexes MultiViews FollowSymLinks > > AllowOverride None > > Order deny,allow > > Deny from all > > Allow from 127.0.0.0/255.0.0.0 ::1/128 > > </Directory> > > > </VirtualHost> > > > -----Oprindelig meddelelse----- > > Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk@googlegroups.com] På vegne af Vell > > Sendt: 15. december 2011 18:55 > > Til: Ruby on Rails: Talk > > Emne: [Rails] Re: How can I get RVM/Passenger/Apache2 to play nicely together > > > Mircea, > > > I tried this installation guide just now and I am still in the same place. Though the instructions are clear, I am still not able to get to my rails application that is located in my home directory. This is on a fresh installed Ubuntu 11.10 system as well. So here is what has been done, based on that guide: > > > RVM Steup > > sudo aptitude install build-essential git-core curl > > > bash < <(curl -shttps://rvm.beginrescueend.com/install/rvm) > > > echo ''[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/ rvm"'' >> ~/.bashrc > > > rvm notes > > > sudo aptitude install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev zlib libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2- dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison > > > rvm install 1.9.2 > > > rvm use 1.9.2 > > > rvm --default use 1.9.2 > > > RAILS SETUP 1 > > gem install rails > > > Added the following to my Gemfile > > gem ''execjs'' > > gem ''therubyracer'' > > > bundle install > > > rails s (saw my application locally on port 3000) > > > APACHE2 Setup > > > sudo aptitude install apache2 > > > Passenger Setup > > > gem install passenger > > > passenger-install-apache2-module > > > Added the following to /etc/apache2/apache2.conf LoadModule passenger_module /home/user/.rvm/gems/ruby-1.9.2- p290/gems/ passenger-3.0.11/ext/apache2/mod_passenger.so > > PassengerRoot /home/user/.rvm/gems/ruby-1.9.2-p290/gems/ > > passenger-3.0.11 > > PassengerRuby /home/user/.rvm/wrappers/ruby-1.9.2-p290/ > > > restarted apache2 > > > Creating My Site > > > Created directory www in my home directory > > > rails new site -d mysql > > > Added the following to /etc/apache2/sites-available/site <VirtualHost *:80> ServerName localhost ServerAlias localhost DocumentRoot /home/vmcilwain/www/site/public </VirtualHost> > > > sudo a2ensite site > > > sudo a2enmod rewrite > > > sudo service apache2 reload > > > Attempted to hit the application with the browser (http://localhost) and I get: It Works! (Apache standard page) Attempt to hit the application with the location http://localhost/siteandI get: Not Found The requested URL /site was not found on this server > > > According to the guide, I should have seen the welcome aboard page of the site application in my www directory. > > > I can''t be this hopeless, what else can I be doing wrong :-/ Any help again is greatly appreciated. > > > On Dec 14, 3:10 am, mg1313 <mirceag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Try the documentation from here:http://www.mirceagoia.com/2011/11/ruby-on-rails-installation-ubuntu-l... > > > > Mircea > > > > On Dec 13, 10:52 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hello all, > > > > > Can anyone point me to any solid documentation on how to set up a > > > > production server using RVM, Passenger, and Apache2? I have been at > > > > this for a week with absolutely no luck at all so I thought I would > > > > post here to see if anyone has managed to get this to work and > > > > written down the steps they used. > > > > > Right now with my current implementation, I am getting a 404 error > > > > when I attempt to locally point my browser to a basic rails > > > > application. > > > > > I am attempting to set this up on an Ubuntu 11.10 system. > > > > > Any help would be greatly appreciated. > > > > > Thanks in advance. > > > -- > > 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Brynjolfur Thorvardsson
2011-Dec-15 20:48 UTC
SV: Re: How can I get RVM/Passenger/Apache2 to play nicely together
Go to http://localhost/site/me (assuming that Rails previously answered to http://localhost/site and the model is called "me" and not "mes" Alternatively you could edit the config/routes.rb file and tell it to point root to the "me" folder. The command is somewhat different depending on your version of Rails but in my current 3.10 the line would look like this: root :to => ''me#index'' -----Oprindelig meddelelse----- Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk@googlegroups.com] På vegne af Vell Sendt: 15. december 2011 21:39 Til: Ruby on Rails: Talk Emne: [Rails] Re: How can I get RVM/Passenger/Apache2 to play nicely together Hmm one more question before I call this a complete success, I just tried to create a new scaffold but it looks like I continue to get the welcome board page of my app. Is this because my sym link is only pointing at public? I removed the index.html file from the application and created a model called "me": bundle exec rails generate scaffold me email:string bundle exec rake:migrate when I then try to go to http://localhost/mes I get the requested URL / site/mes was not found. On Dec 15, 2:37 pm, Brynjolfur Thorvardsson <bi...-6eh5JQIm30aHXe+LvDLADg@public.gmane.org> wrote:> Vell, with your setup as far as I can see, you can without changing the apache site and localhost files at all. > > You can create a symbolic link from your /var/www directory to your Rails directory, something along these lines: > > $sudo ln -s /home/vmcilwain/www/site/public /var/www/site > > Now, if you go tohttp://localhost/siteyou should get your Rails site up. > > Of course, it is different if you want to be able to get your site to answer tohttp://localhostdirectly. One way I have achieved this is to edit /etc/apache2/sites-available/default (only change is at top, DocumentRoot, and removing the <directory /var/www> section which isn''t really necessary): > > <VirtualHost *:80> > ServerAdmin webmaster@localhost > > DocumentRoot /home/binni/mysite/public > <Directory /> > Options FollowSymLinks > AllowOverride None > </Directory> > ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ > <Directory "/usr/lib/cgi-bin"> > AllowOverride None > Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch > Order allow,deny > Allow from all > </Directory> > ErrorLog ${APACHE_LOG_DIR}/error.log > > # Possible values include: debug, info, notice, warn, error, crit, > # alert, emerg. > LogLevel warn > > CustomLog ${APACHE_LOG_DIR}/access.log combined > > Alias /doc/ "/usr/share/doc/" > <Directory "/usr/share/doc/"> > Options Indexes MultiViews FollowSymLinks > AllowOverride None > Order deny,allow > Deny from all > Allow from 127.0.0.0/255.0.0.0 ::1/128 > </Directory> > > </VirtualHost> > > -----Oprindelig meddelelse----- > Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] På vegne af Vell > Sendt: 15. december 2011 18:55 > Til: Ruby on Rails: Talk > Emne: [Rails] Re: How can I get RVM/Passenger/Apache2 to play nicely > together > > Mircea, > > I tried this installation guide just now and I am still in the same place. Though the instructions are clear, I am still not able to get to my rails application that is located in my home directory. This is on a fresh installed Ubuntu 11.10 system as well. So here is what has been done, based on that guide: > > RVM Steup > sudo aptitude install build-essential git-core curl > > bash < <(curl -shttps://rvm.beginrescueend.com/install/rvm) > > echo ''[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/ > rvm"'' >> ~/.bashrc > > rvm notes > > sudo aptitude install build-essential openssl libreadline6 > libreadline6-dev zlib1g zlib1g-dev zlib libssl-dev libyaml-dev > libsqlite3-0 libsqlite3-dev sqlite3 libxml2- dev libxslt-dev autoconf > libc6-dev ncurses-dev automake libtool bison > > rvm install 1.9.2 > > rvm use 1.9.2 > > rvm --default use 1.9.2 > > RAILS SETUP 1 > gem install rails > > Added the following to my Gemfile > gem ''execjs'' > gem ''therubyracer'' > > bundle install > > rails s (saw my application locally on port 3000) > > APACHE2 Setup > > sudo aptitude install apache2 > > Passenger Setup > > gem install passenger > > passenger-install-apache2-module > > Added the following to /etc/apache2/apache2.conf LoadModule > passenger_module /home/user/.rvm/gems/ruby-1.9.2- p290/gems/ > passenger-3.0.11/ext/apache2/mod_passenger.so > PassengerRoot /home/user/.rvm/gems/ruby-1.9.2-p290/gems/ > passenger-3.0.11 > PassengerRuby /home/user/.rvm/wrappers/ruby-1.9.2-p290/ > > restarted apache2 > > Creating My Site > > Created directory www in my home directory > > rails new site -d mysql > > Added the following to /etc/apache2/sites-available/site <VirtualHost > *:80> ServerName localhost ServerAlias localhost DocumentRoot > /home/vmcilwain/www/site/public </VirtualHost> > > sudo a2ensite site > > sudo a2enmod rewrite > > sudo service apache2 reload > > Attempted to hit the application with the browser (http://localhost) > and I get: It Works! (Apache standard page) Attempt to hit the > application with the location http://localhost/siteand I get: Not > Found The requested URL /site was not found on this server > > According to the guide, I should have seen the welcome aboard page of the site application in my www directory. > > I can''t be this hopeless, what else can I be doing wrong :-/ Any help again is greatly appreciated. > > On Dec 14, 3:10 am, mg1313 <mirceag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > > > Try the documentation from here:http://www.mirceagoia.com/2011/11/ruby-on-rails-installation-ubuntu-l... > > > Mircea > > > On Dec 13, 10:52 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Hello all, > > > > Can anyone point me to any solid documentation on how to set up a > > > production server using RVM, Passenger, and Apache2? I have been > > > at this for a week with absolutely no luck at all so I thought I > > > would post here to see if anyone has managed to get this to work > > > and written down the steps they used. > > > > Right now with my current implementation, I am getting a 404 error > > > when I attempt to locally point my browser to a basic rails > > > application. > > > > I am attempting to set this up on an Ubuntu 11.10 system. > > > > Any help would be greatly appreciated. > > > > Thanks in advance. > > -- > 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Brynjolfur Thorvardsson
2011-Dec-15 20:54 UTC
SV: Re: How can I get RVM/Passenger/Apache2 to play nicely together
Hi, I forgot one thing that you might need to do. When using a symlink I think you need to add some lines to the bottom of the apache config file. Here is what I did in a previous setup which works: $sudo ln -s /home/binni/rails/testapp/public /var/www/public $sudo vim /etc/apache2/sites-available/default Added lines: RailsBaseURI /testapp RailsEnv development $sudo service apache2 restart The symlink is slightly different from the one I sent you earlier, it creates a "public" link in the end of the command. -----Oprindelig meddelelse----- Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk@googlegroups.com] På vegne af Vell Sendt: 15. december 2011 21:48 Til: Ruby on Rails: Talk Emne: [Rails] Re: How can I get RVM/Passenger/Apache2 to play nicely together Nevermind, my sym link was pointing to an old directory that had the same application name which was the test to see if it was working using localhost 3000. So at this point When I set up the sym link correctly and I hit the location with a browser, I am getting a list of the contents of public. Maybe that is the intended behavior until I recreate my basic scaffold. On Dec 15, 3:38 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hmm one more question before I call this a complete success, I just > tried to create a new scaffold but it looks like I continue to get the > welcome board page of my app. Is this because my sym link is only > pointing at public? > > I removed the index.html file from the application and created a model > called "me": > > bundle exec rails generate scaffold me email:string bundle exec > rake:migrate > > when I then try to go tohttp://localhost/mesI get the requested URL / > site/mes was not found. > > On Dec 15, 2:37 pm, Brynjolfur Thorvardsson <bi...-6eh5JQIm30aHXe+LvDLADg@public.gmane.org> wrote: > > > > > > > > > Vell, with your setup as far as I can see, you can without changing the apache site and localhost files at all. > > > You can create a symbolic link from your /var/www directory to your Rails directory, something along these lines: > > > $sudo ln -s /home/vmcilwain/www/site/public /var/www/site > > > Now, if you go tohttp://localhost/siteyoushould get your Rails site up. > > > Of course, it is different if you want to be able to get your site to answer tohttp://localhostdirectly. One way I have achieved this is to edit /etc/apache2/sites-available/default (only change is at top, DocumentRoot, and removing the <directory /var/www> section which isn''t really necessary): > > > <VirtualHost *:80> > > ServerAdmin webmaster@localhost > > > DocumentRoot /home/binni/mysite/public > > <Directory /> > > Options FollowSymLinks > > AllowOverride None > > </Directory> > > ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ > > <Directory "/usr/lib/cgi-bin"> > > AllowOverride None > > Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch > > Order allow,deny > > Allow from all > > </Directory> > > ErrorLog ${APACHE_LOG_DIR}/error.log > > > # Possible values include: debug, info, notice, warn, error, crit, > > # alert, emerg. > > LogLevel warn > > > CustomLog ${APACHE_LOG_DIR}/access.log combined > > > Alias /doc/ "/usr/share/doc/" > > <Directory "/usr/share/doc/"> > > Options Indexes MultiViews FollowSymLinks > > AllowOverride None > > Order deny,allow > > Deny from all > > Allow from 127.0.0.0/255.0.0.0 ::1/128 > > </Directory> > > > </VirtualHost> > > > -----Oprindelig meddelelse----- > > Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > [mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] På vegne af Vell > > Sendt: 15. december 2011 18:55 > > Til: Ruby on Rails: Talk > > Emne: [Rails] Re: How can I get RVM/Passenger/Apache2 to play nicely > > together > > > Mircea, > > > I tried this installation guide just now and I am still in the same place. Though the instructions are clear, I am still not able to get to my rails application that is located in my home directory. This is on a fresh installed Ubuntu 11.10 system as well. So here is what has been done, based on that guide: > > > RVM Steup > > sudo aptitude install build-essential git-core curl > > > bash < <(curl -shttps://rvm.beginrescueend.com/install/rvm) > > > echo ''[[ -s "$HOME/.rvm/scripts/rvm" ]] && source > > "$HOME/.rvm/scripts/ rvm"'' >> ~/.bashrc > > > rvm notes > > > sudo aptitude install build-essential openssl libreadline6 > > libreadline6-dev zlib1g zlib1g-dev zlib libssl-dev libyaml-dev > > libsqlite3-0 libsqlite3-dev sqlite3 libxml2- dev libxslt-dev > > autoconf libc6-dev ncurses-dev automake libtool bison > > > rvm install 1.9.2 > > > rvm use 1.9.2 > > > rvm --default use 1.9.2 > > > RAILS SETUP 1 > > gem install rails > > > Added the following to my Gemfile > > gem ''execjs'' > > gem ''therubyracer'' > > > bundle install > > > rails s (saw my application locally on port 3000) > > > APACHE2 Setup > > > sudo aptitude install apache2 > > > Passenger Setup > > > gem install passenger > > > passenger-install-apache2-module > > > Added the following to /etc/apache2/apache2.conf LoadModule > > passenger_module /home/user/.rvm/gems/ruby-1.9.2- p290/gems/ > > passenger-3.0.11/ext/apache2/mod_passenger.so > > PassengerRoot /home/user/.rvm/gems/ruby-1.9.2-p290/gems/ > > passenger-3.0.11 > > PassengerRuby /home/user/.rvm/wrappers/ruby-1.9.2-p290/ > > > restarted apache2 > > > Creating My Site > > > Created directory www in my home directory > > > rails new site -d mysql > > > Added the following to /etc/apache2/sites-available/site > > <VirtualHost *:80> ServerName localhost ServerAlias localhost > > DocumentRoot /home/vmcilwain/www/site/public </VirtualHost> > > > sudo a2ensite site > > > sudo a2enmod rewrite > > > sudo service apache2 reload > > > Attempted to hit the application with the browser (http://localhost) > > and I get: It Works! (Apache standard page) Attempt to hit the > > application with the location http://localhost/siteandI get: Not > > Found The requested URL /site was not found on this server > > > According to the guide, I should have seen the welcome aboard page of the site application in my www directory. > > > I can''t be this hopeless, what else can I be doing wrong :-/ Any help again is greatly appreciated. > > > On Dec 14, 3:10 am, mg1313 <mirceag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Try the documentation from here:http://www.mirceagoia.com/2011/11/ruby-on-rails-installation-ubuntu-l... > > > > Mircea > > > > On Dec 13, 10:52 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hello all, > > > > > Can anyone point me to any solid documentation on how to set up > > > > a production server using RVM, Passenger, and Apache2? I have > > > > been at this for a week with absolutely no luck at all so I > > > > thought I would post here to see if anyone has managed to get > > > > this to work and written down the steps they used. > > > > > Right now with my current implementation, I am getting a 404 > > > > error when I attempt to locally point my browser to a basic > > > > rails application. > > > > > I am attempting to set this up on an Ubuntu 11.10 system. > > > > > Any help would be greatly appreciated. > > > > > Thanks in advance. > > > -- > > 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Brynjolfur Thorvardsson
2011-Dec-15 20:58 UTC
SV: Re: How can I get RVM/Passenger/Apache2 to play nicely together
Sorry to confuse you - this has something to do with Adhearsion which I am installing along with Rails. The original symlink should probably work fine, and I think it''s time I withdrew ... -----Oprindelig meddelelse----- Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk@googlegroups.com] På vegne af Brynjolfur Thorvardsson Sendt: 15. december 2011 21:55 Til: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Emne: SV: [Rails] Re: How can I get RVM/Passenger/Apache2 to play nicely together Hi, I forgot one thing that you might need to do. When using a symlink I think you need to add some lines to the bottom of the apache config file. Here is what I did in a previous setup which works: $sudo ln -s /home/binni/rails/testapp/public /var/www/public $sudo vim /etc/apache2/sites-available/default Added lines: RailsBaseURI /testapp RailsEnv development $sudo service apache2 restart The symlink is slightly different from the one I sent you earlier, it creates a "public" link in the end of the command. -----Oprindelig meddelelse----- Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk@googlegroups.com] På vegne af Vell Sendt: 15. december 2011 21:48 Til: Ruby on Rails: Talk Emne: [Rails] Re: How can I get RVM/Passenger/Apache2 to play nicely together Nevermind, my sym link was pointing to an old directory that had the same application name which was the test to see if it was working using localhost 3000. So at this point When I set up the sym link correctly and I hit the location with a browser, I am getting a list of the contents of public. Maybe that is the intended behavior until I recreate my basic scaffold. On Dec 15, 3:38 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hmm one more question before I call this a complete success, I just > tried to create a new scaffold but it looks like I continue to get the > welcome board page of my app. Is this because my sym link is only > pointing at public? > > I removed the index.html file from the application and created a model > called "me": > > bundle exec rails generate scaffold me email:string bundle exec > rake:migrate > > when I then try to go tohttp://localhost/mesI get the requested URL / > site/mes was not found. > > On Dec 15, 2:37 pm, Brynjolfur Thorvardsson <bi...-6eh5JQIm30aHXe+LvDLADg@public.gmane.org> wrote: > > > > > > > > > Vell, with your setup as far as I can see, you can without changing the apache site and localhost files at all. > > > You can create a symbolic link from your /var/www directory to your Rails directory, something along these lines: > > > $sudo ln -s /home/vmcilwain/www/site/public /var/www/site > > > Now, if you go tohttp://localhost/siteyoushould get your Rails site up. > > > Of course, it is different if you want to be able to get your site to answer tohttp://localhostdirectly. One way I have achieved this is to edit /etc/apache2/sites-available/default (only change is at top, DocumentRoot, and removing the <directory /var/www> section which isn''t really necessary): > > > <VirtualHost *:80> > > ServerAdmin webmaster@localhost > > > DocumentRoot /home/binni/mysite/public > > <Directory /> > > Options FollowSymLinks > > AllowOverride None > > </Directory> > > ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ > > <Directory "/usr/lib/cgi-bin"> > > AllowOverride None > > Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch > > Order allow,deny > > Allow from all > > </Directory> > > ErrorLog ${APACHE_LOG_DIR}/error.log > > > # Possible values include: debug, info, notice, warn, error, crit, > > # alert, emerg. > > LogLevel warn > > > CustomLog ${APACHE_LOG_DIR}/access.log combined > > > Alias /doc/ "/usr/share/doc/" > > <Directory "/usr/share/doc/"> > > Options Indexes MultiViews FollowSymLinks > > AllowOverride None > > Order deny,allow > > Deny from all > > Allow from 127.0.0.0/255.0.0.0 ::1/128 > > </Directory> > > > </VirtualHost> > > > -----Oprindelig meddelelse----- > > Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > [mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] På vegne af Vell > > Sendt: 15. december 2011 18:55 > > Til: Ruby on Rails: Talk > > Emne: [Rails] Re: How can I get RVM/Passenger/Apache2 to play nicely > > together > > > Mircea, > > > I tried this installation guide just now and I am still in the same place. Though the instructions are clear, I am still not able to get to my rails application that is located in my home directory. This is on a fresh installed Ubuntu 11.10 system as well. So here is what has been done, based on that guide: > > > RVM Steup > > sudo aptitude install build-essential git-core curl > > > bash < <(curl -shttps://rvm.beginrescueend.com/install/rvm) > > > echo ''[[ -s "$HOME/.rvm/scripts/rvm" ]] && source > > "$HOME/.rvm/scripts/ rvm"'' >> ~/.bashrc > > > rvm notes > > > sudo aptitude install build-essential openssl libreadline6 > > libreadline6-dev zlib1g zlib1g-dev zlib libssl-dev libyaml-dev > > libsqlite3-0 libsqlite3-dev sqlite3 libxml2- dev libxslt-dev > > autoconf libc6-dev ncurses-dev automake libtool bison > > > rvm install 1.9.2 > > > rvm use 1.9.2 > > > rvm --default use 1.9.2 > > > RAILS SETUP 1 > > gem install rails > > > Added the following to my Gemfile > > gem ''execjs'' > > gem ''therubyracer'' > > > bundle install > > > rails s (saw my application locally on port 3000) > > > APACHE2 Setup > > > sudo aptitude install apache2 > > > Passenger Setup > > > gem install passenger > > > passenger-install-apache2-module > > > Added the following to /etc/apache2/apache2.conf LoadModule > > passenger_module /home/user/.rvm/gems/ruby-1.9.2- p290/gems/ > > passenger-3.0.11/ext/apache2/mod_passenger.so > > PassengerRoot /home/user/.rvm/gems/ruby-1.9.2-p290/gems/ > > passenger-3.0.11 > > PassengerRuby /home/user/.rvm/wrappers/ruby-1.9.2-p290/ > > > restarted apache2 > > > Creating My Site > > > Created directory www in my home directory > > > rails new site -d mysql > > > Added the following to /etc/apache2/sites-available/site > > <VirtualHost *:80> ServerName localhost ServerAlias localhost > > DocumentRoot /home/vmcilwain/www/site/public </VirtualHost> > > > sudo a2ensite site > > > sudo a2enmod rewrite > > > sudo service apache2 reload > > > Attempted to hit the application with the browser (http://localhost) > > and I get: It Works! (Apache standard page) Attempt to hit the > > application with the location http://localhost/siteandI get: Not > > Found The requested URL /site was not found on this server > > > According to the guide, I should have seen the welcome aboard page of the site application in my www directory. > > > I can''t be this hopeless, what else can I be doing wrong :-/ Any help again is greatly appreciated. > > > On Dec 14, 3:10 am, mg1313 <mirceag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Try the documentation from here:http://www.mirceagoia.com/2011/11/ruby-on-rails-installation-ubuntu-l... > > > > Mircea > > > > On Dec 13, 10:52 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hello all, > > > > > Can anyone point me to any solid documentation on how to set up > > > > a production server using RVM, Passenger, and Apache2? I have > > > > been at this for a week with absolutely no luck at all so I > > > > thought I would post here to see if anyone has managed to get > > > > this to work and written down the steps they used. > > > > > Right now with my current implementation, I am getting a 404 > > > > error when I attempt to locally point my browser to a basic > > > > rails application. > > > > > I am attempting to set this up on an Ubuntu 11.10 system. > > > > > Any help would be greatly appreciated. > > > > > Thanks in advance. > > > -- > > 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Vell
2011-Dec-16 16:32 UTC
Re: How can I get RVM/Passenger/Apache2 to play nicely together
So much for thinking things were working. Nothing I have tried has worked. Thanks for the suggestions all but at this point, Im frustrated enough that I am going to take a break for a while before I throw this machine out the window and drop rails entirely. It shouldn''t be this hard to get a production server setup. On Dec 15, 3:47 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Nevermind, my sym link was pointing to an old directory that had the > same application name which was the test to see if it was working > using localhost 3000. So at this point When I set up the sym link > correctly and I hit the location with a browser, I am getting a list > of the contents of public. Maybe that is the intended behavior until I > recreate my basic scaffold. > > On Dec 15, 3:38 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > Hmm one more question before I call this a complete success, I just > > tried to create a new scaffold but it looks like I continue to get the > > welcome board page of my app. Is this because my sym link is only > > pointing at public? > > > I removed the index.html file from the application and created a model > > called "me": > > > bundle exec rails generate scaffold me email:string > > bundle exec rake:migrate > > > when I then try to go tohttp://localhost/mesIget the requested URL / > > site/mes was not found. > > > On Dec 15, 2:37 pm, Brynjolfur Thorvardsson <bi...-6eh5JQIm30aHXe+LvDLADg@public.gmane.org> wrote: > > > > Vell, with your setup as far as I can see, you can without changing the apache site and localhost files at all. > > > > You can create a symbolic link from your /var/www directory to your Rails directory, something along these lines: > > > > $sudo ln -s /home/vmcilwain/www/site/public /var/www/site > > > > Now, if you go tohttp://localhost/siteyoushouldget your Rails site up. > > > > Of course, it is different if you want to be able to get your site to answer tohttp://localhostdirectly. One way I have achieved this is to edit /etc/apache2/sites-available/default (only change is at top, DocumentRoot, and removing the <directory /var/www> section which isn''t really necessary): > > > > <VirtualHost *:80> > > > ServerAdmin webmaster@localhost > > > > DocumentRoot /home/binni/mysite/public > > > <Directory /> > > > Options FollowSymLinks > > > AllowOverride None > > > </Directory> > > > ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ > > > <Directory "/usr/lib/cgi-bin"> > > > AllowOverride None > > > Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch > > > Order allow,deny > > > Allow from all > > > </Directory> > > > ErrorLog ${APACHE_LOG_DIR}/error.log > > > > # Possible values include: debug, info, notice, warn, error, crit, > > > # alert, emerg. > > > LogLevel warn > > > > CustomLog ${APACHE_LOG_DIR}/access.log combined > > > > Alias /doc/ "/usr/share/doc/" > > > <Directory "/usr/share/doc/"> > > > Options Indexes MultiViews FollowSymLinks > > > AllowOverride None > > > Order deny,allow > > > Deny from all > > > Allow from 127.0.0.0/255.0.0.0 ::1/128 > > > </Directory> > > > > </VirtualHost> > > > > -----Oprindelig meddelelse----- > > > Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk@googlegroups.com] På vegne af Vell > > > Sendt: 15. december 2011 18:55 > > > Til: Ruby on Rails: Talk > > > Emne: [Rails] Re: How can I get RVM/Passenger/Apache2 to play nicely together > > > > Mircea, > > > > I tried this installation guide just now and I am still in the same place. Though the instructions are clear, I am still not able to get to my rails application that is located in my home directory. This is on a fresh installed Ubuntu 11.10 system as well. So here is what has been done, based on that guide: > > > > RVM Steup > > > sudo aptitude install build-essential git-core curl > > > > bash < <(curl -shttps://rvm.beginrescueend.com/install/rvm) > > > > echo ''[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/ rvm"'' >> ~/.bashrc > > > > rvm notes > > > > sudo aptitude install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev zlib libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2- dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison > > > > rvm install 1.9.2 > > > > rvm use 1.9.2 > > > > rvm --default use 1.9.2 > > > > RAILS SETUP 1 > > > gem install rails > > > > Added the following to my Gemfile > > > gem ''execjs'' > > > gem ''therubyracer'' > > > > bundle install > > > > rails s (saw my application locally on port 3000) > > > > APACHE2 Setup > > > > sudo aptitude install apache2 > > > > Passenger Setup > > > > gem install passenger > > > > passenger-install-apache2-module > > > > Added the following to /etc/apache2/apache2.conf LoadModule passenger_module /home/user/.rvm/gems/ruby-1.9.2- p290/gems/ passenger-3.0.11/ext/apache2/mod_passenger.so > > > PassengerRoot /home/user/.rvm/gems/ruby-1.9.2-p290/gems/ > > > passenger-3.0.11 > > > PassengerRuby /home/user/.rvm/wrappers/ruby-1.9.2-p290/ > > > > restarted apache2 > > > > Creating My Site > > > > Created directory www in my home directory > > > > rails new site -d mysql > > > > Added the following to /etc/apache2/sites-available/site <VirtualHost *:80> ServerName localhost ServerAlias localhost DocumentRoot /home/vmcilwain/www/site/public </VirtualHost> > > > > sudo a2ensite site > > > > sudo a2enmod rewrite > > > > sudo service apache2 reload > > > > Attempted to hit the application with the browser (http://localhost) and I get: It Works! (Apache standard page) Attempt to hit the application with the location http://localhost/siteandIget: Not Found The requested URL /site was not found on this server > > > > According to the guide, I should have seen the welcome aboard page of the site application in my www directory. > > > > I can''t be this hopeless, what else can I be doing wrong :-/ Any help again is greatly appreciated. > > > > On Dec 14, 3:10 am, mg1313 <mirceag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Try the documentation from here:http://www.mirceagoia.com/2011/11/ruby-on-rails-installation-ubuntu-l... > > > > > Mircea > > > > > On Dec 13, 10:52 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > Hello all, > > > > > > Can anyone point me to any solid documentation on how to set up a > > > > > production server using RVM, Passenger, and Apache2? I have been at > > > > > this for a week with absolutely no luck at all so I thought I would > > > > > post here to see if anyone has managed to get this to work and > > > > > written down the steps they used. > > > > > > Right now with my current implementation, I am getting a 404 error > > > > > when I attempt to locally point my browser to a basic rails > > > > > application. > > > > > > I am attempting to set this up on an Ubuntu 11.10 system. > > > > > > Any help would be greatly appreciated. > > > > > > Thanks in advance. > > > > -- > > > 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-talk-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm. > > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Vell
2011-Dec-16 16:40 UTC
Re: How can I get RVM/Passenger/Apache2 to play nicely together
Adding those lines to the site I at least am getting a passenger error which is better than not getting anything at all. That is finally progress. Thank you for the additional info. I have also put everything into the apache2 file instead of splitting them into different files. Once I step away for a while and come back to it to try and get the rest working I will split the files as Apache would want me to. Would I be able to switch the RailsEnv when I am finally ready to put this into production mode? On Dec 15, 3:54 pm, Brynjolfur Thorvardsson <bi...-6eh5JQIm30aHXe+LvDLADg@public.gmane.org> wrote:> Hi, I forgot one thing that you might need to do. When using a symlink I think you need to add some lines to the bottom of the apache config file. Here is what I did in a previous setup which works: > > $sudo ln -s /home/binni/rails/testapp/public /var/www/public > > $sudo vim /etc/apache2/sites-available/default > Added lines: > RailsBaseURI /testapp > RailsEnv development > $sudo service apache2 restart > > The symlink is slightly different from the one I sent you earlier, it creates a "public" link in the end of the command. > > -----Oprindelig meddelelse----- > Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk@googlegroups.com] På vegne af Vell > Sendt: 15. december 2011 21:48 > Til: Ruby on Rails: Talk > Emne: [Rails] Re: How can I get RVM/Passenger/Apache2 to play nicely together > > Nevermind, my sym link was pointing to an old directory that had the same application name which was the test to see if it was working using localhost 3000. So at this point When I set up the sym link correctly and I hit the location with a browser, I am getting a list of the contents of public. Maybe that is the intended behavior until I recreate my basic scaffold. > > On Dec 15, 3:38 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > > > Hmm one more question before I call this a complete success, I just > > tried to create a new scaffold but it looks like I continue to get the > > welcome board page of my app. Is this because my sym link is only > > pointing at public? > > > I removed the index.html file from the application and created a model > > called "me": > > > bundle exec rails generate scaffold me email:string bundle exec > > rake:migrate > > > when I then try to go tohttp://localhost/mesIget the requested URL / > > site/mes was not found. > > > On Dec 15, 2:37 pm, Brynjolfur Thorvardsson <bi...-6eh5JQIm30aHXe+LvDLADg@public.gmane.org> wrote: > > > > Vell, with your setup as far as I can see, you can without changing the apache site and localhost files at all. > > > > You can create a symbolic link from your /var/www directory to your Rails directory, something along these lines: > > > > $sudo ln -s /home/vmcilwain/www/site/public /var/www/site > > > > Now, if you go tohttp://localhost/siteyoushouldget your Rails site up. > > > > Of course, it is different if you want to be able to get your site to answer tohttp://localhostdirectly. One way I have achieved this is to edit /etc/apache2/sites-available/default (only change is at top, DocumentRoot, and removing the <directory /var/www> section which isn''t really necessary): > > > > <VirtualHost *:80> > > > ServerAdmin webmaster@localhost > > > > DocumentRoot /home/binni/mysite/public > > > <Directory /> > > > Options FollowSymLinks > > > AllowOverride None > > > </Directory> > > > ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ > > > <Directory "/usr/lib/cgi-bin"> > > > AllowOverride None > > > Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch > > > Order allow,deny > > > Allow from all > > > </Directory> > > > ErrorLog ${APACHE_LOG_DIR}/error.log > > > > # Possible values include: debug, info, notice, warn, error, crit, > > > # alert, emerg. > > > LogLevel warn > > > > CustomLog ${APACHE_LOG_DIR}/access.log combined > > > > Alias /doc/ "/usr/share/doc/" > > > <Directory "/usr/share/doc/"> > > > Options Indexes MultiViews FollowSymLinks > > > AllowOverride None > > > Order deny,allow > > > Deny from all > > > Allow from 127.0.0.0/255.0.0.0 ::1/128 > > > </Directory> > > > > </VirtualHost> > > > > -----Oprindelig meddelelse----- > > > Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > > [mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] På vegne af Vell > > > Sendt: 15. december 2011 18:55 > > > Til: Ruby on Rails: Talk > > > Emne: [Rails] Re: How can I get RVM/Passenger/Apache2 to play nicely > > > together > > > > Mircea, > > > > I tried this installation guide just now and I am still in the same place. Though the instructions are clear, I am still not able to get to my rails application that is located in my home directory. This is on a fresh installed Ubuntu 11.10 system as well. So here is what has been done, based on that guide: > > > > RVM Steup > > > sudo aptitude install build-essential git-core curl > > > > bash < <(curl -shttps://rvm.beginrescueend.com/install/rvm) > > > > echo ''[[ -s "$HOME/.rvm/scripts/rvm" ]] && source > > > "$HOME/.rvm/scripts/ rvm"'' >> ~/.bashrc > > > > rvm notes > > > > sudo aptitude install build-essential openssl libreadline6 > > > libreadline6-dev zlib1g zlib1g-dev zlib libssl-dev libyaml-dev > > > libsqlite3-0 libsqlite3-dev sqlite3 libxml2- dev libxslt-dev > > > autoconf libc6-dev ncurses-dev automake libtool bison > > > > rvm install 1.9.2 > > > > rvm use 1.9.2 > > > > rvm --default use 1.9.2 > > > > RAILS SETUP 1 > > > gem install rails > > > > Added the following to my Gemfile > > > gem ''execjs'' > > > gem ''therubyracer'' > > > > bundle install > > > > rails s (saw my application locally on port 3000) > > > > APACHE2 Setup > > > > sudo aptitude install apache2 > > > > Passenger Setup > > > > gem install passenger > > > > passenger-install-apache2-module > > > > Added the following to /etc/apache2/apache2.conf LoadModule > > > passenger_module /home/user/.rvm/gems/ruby-1.9.2- p290/gems/ > > > passenger-3.0.11/ext/apache2/mod_passenger.so > > > PassengerRoot /home/user/.rvm/gems/ruby-1.9.2-p290/gems/ > > > passenger-3.0.11 > > > PassengerRuby /home/user/.rvm/wrappers/ruby-1.9.2-p290/ > > > > restarted apache2 > > > > Creating My Site > > > > Created directory www in my home directory > > > > rails new site -d mysql > > > > Added the following to /etc/apache2/sites-available/site > > > <VirtualHost *:80> ServerName localhost ServerAlias localhost > > > DocumentRoot /home/vmcilwain/www/site/public </VirtualHost> > > > > sudo a2ensite site > > > > sudo a2enmod rewrite > > > > sudo service apache2 reload > > > > Attempted to hit the application with the browser (http://localhost) > > > and I get: It Works! (Apache standard page) Attempt to hit the > > > application with the location http://localhost/siteandIget: Not > > > Found The requested URL /site was not found on this server > > > > According to the guide, I should have seen the welcome aboard page of the site application in my www directory. > > > > I can''t be this hopeless, what else can I be doing wrong :-/ Any help again is greatly appreciated. > > > > On Dec 14, 3:10 am, mg1313 <mirceag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Try the documentation from here:http://www.mirceagoia.com/2011/11/ruby-on-rails-installation-ubuntu-l... > > > > > Mircea > > > > > On Dec 13, 10:52 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > Hello all, > > > > > > Can anyone point me to any solid documentation on how to set up > > > > > a production server using RVM, Passenger, and Apache2? I have > > > > > been at this for a week with absolutely no luck at all so I > > > > > thought I would post here to see if anyone has managed to get > > > > > this to work and written down the steps they used. > > > > > > Right now with my current implementation, I am getting a 404 > > > > > error when I attempt to locally point my browser to a basic > > > > > rails application. > > > > > > I am attempting to set this up on an Ubuntu 11.10 system. > > > > > > Any help would be greatly appreciated. > > > > > > Thanks in advance. > > > > -- > > > 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-talk-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm. > > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Vell
2011-Dec-16 16:54 UTC
Re: How can I get RVM/Passenger/Apache2 to play nicely together
OK, So through all the pain an anguish I think I finally have a working server (NO JOKE!) Here are the steps that I have done to get this working with apache, passenger, and rvm After installing all the necessary software software update rvm (single user) rails passenger passenger apache module I did the following: Created directory apps in my home directory Created a rails app called site in the newly created apps directory Added the following to the apache2.conf file <VirtualHost *:80> ServerName localhost DocumentRoot /var/www RailsBaseURI /site RailsEnv development </VirtualHost> LoadModule passenger_module /home/vmcilwain/.rvm/gems/ruby-1.9.2-p290/ gems/passenger-3.0.11/ext/apache2/mod_passenger.so PassengerRoot /home/vmcilwain/.rvm/gems/ruby-1.9.2-p290/gems/ passenger-3.0.11 PassengerRuby /home/vmcilwain/.rvm/wrappers/ruby-1.9.2-p290/ruby Then created a symlink called sites that points to /home/vmcilwain/ apps/site/public From there, I can hit http://localhost/site and get the index page of the sites app. When I click on the link for looking at the application environement the information comes up which tells me that my application is working as it should be. Thanks everyone for being patient with me and my frustration. On Dec 15, 3:58 pm, Brynjolfur Thorvardsson <bi...-6eh5JQIm30aHXe+LvDLADg@public.gmane.org> wrote:> Sorry to confuse you - this has something to do with Adhearsion which I am installing along with Rails. The original symlink should probably work fine, and I think it''s time I withdrew ... > > -----Oprindelig meddelelse----- > Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk@googlegroups.com] På vegne af Brynjolfur Thorvardsson > Sendt: 15. december 2011 21:55 > Til: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > Emne: SV: [Rails] Re: How can I get RVM/Passenger/Apache2 to play nicely together > > Hi, I forgot one thing that you might need to do. When using a symlink I think you need to add some lines to the bottom of the apache config file. Here is what I did in a previous setup which works: > > $sudo ln -s /home/binni/rails/testapp/public /var/www/public > > $sudo vim /etc/apache2/sites-available/default > Added lines: > RailsBaseURI /testapp > RailsEnv development > $sudo service apache2 restart > > The symlink is slightly different from the one I sent you earlier, it creates a "public" link in the end of the command. > > -----Oprindelig meddelelse----- > Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk@googlegroups.com] På vegne af Vell > Sendt: 15. december 2011 21:48 > Til: Ruby on Rails: Talk > Emne: [Rails] Re: How can I get RVM/Passenger/Apache2 to play nicely together > > Nevermind, my sym link was pointing to an old directory that had the same application name which was the test to see if it was working using localhost 3000. So at this point When I set up the sym link correctly and I hit the location with a browser, I am getting a list of the contents of public. Maybe that is the intended behavior until I recreate my basic scaffold. > > On Dec 15, 3:38 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > > > Hmm one more question before I call this a complete success, I just > > tried to create a new scaffold but it looks like I continue to get the > > welcome board page of my app. Is this because my sym link is only > > pointing at public? > > > I removed the index.html file from the application and created a model > > called "me": > > > bundle exec rails generate scaffold me email:string bundle exec > > rake:migrate > > > when I then try to go tohttp://localhost/mesIget the requested URL / > > site/mes was not found. > > > On Dec 15, 2:37 pm, Brynjolfur Thorvardsson <bi...-6eh5JQIm30aHXe+LvDLADg@public.gmane.org> wrote: > > > > Vell, with your setup as far as I can see, you can without changing the apache site and localhost files at all. > > > > You can create a symbolic link from your /var/www directory to your Rails directory, something along these lines: > > > > $sudo ln -s /home/vmcilwain/www/site/public /var/www/site > > > > Now, if you go tohttp://localhost/siteyoushouldget your Rails site up. > > > > Of course, it is different if you want to be able to get your site to answer tohttp://localhostdirectly. One way I have achieved this is to edit /etc/apache2/sites-available/default (only change is at top, DocumentRoot, and removing the <directory /var/www> section which isn''t really necessary): > > > > <VirtualHost *:80> > > > ServerAdmin webmaster@localhost > > > > DocumentRoot /home/binni/mysite/public > > > <Directory /> > > > Options FollowSymLinks > > > AllowOverride None > > > </Directory> > > > ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ > > > <Directory "/usr/lib/cgi-bin"> > > > AllowOverride None > > > Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch > > > Order allow,deny > > > Allow from all > > > </Directory> > > > ErrorLog ${APACHE_LOG_DIR}/error.log > > > > # Possible values include: debug, info, notice, warn, error, crit, > > > # alert, emerg. > > > LogLevel warn > > > > CustomLog ${APACHE_LOG_DIR}/access.log combined > > > > Alias /doc/ "/usr/share/doc/" > > > <Directory "/usr/share/doc/"> > > > Options Indexes MultiViews FollowSymLinks > > > AllowOverride None > > > Order deny,allow > > > Deny from all > > > Allow from 127.0.0.0/255.0.0.0 ::1/128 > > > </Directory> > > > > </VirtualHost> > > > > -----Oprindelig meddelelse----- > > > Fra: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > > [mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] På vegne af Vell > > > Sendt: 15. december 2011 18:55 > > > Til: Ruby on Rails: Talk > > > Emne: [Rails] Re: How can I get RVM/Passenger/Apache2 to play nicely > > > together > > > > Mircea, > > > > I tried this installation guide just now and I am still in the same place. Though the instructions are clear, I am still not able to get to my rails application that is located in my home directory. This is on a fresh installed Ubuntu 11.10 system as well. So here is what has been done, based on that guide: > > > > RVM Steup > > > sudo aptitude install build-essential git-core curl > > > > bash < <(curl -shttps://rvm.beginrescueend.com/install/rvm) > > > > echo ''[[ -s "$HOME/.rvm/scripts/rvm" ]] && source > > > "$HOME/.rvm/scripts/ rvm"'' >> ~/.bashrc > > > > rvm notes > > > > sudo aptitude install build-essential openssl libreadline6 > > > libreadline6-dev zlib1g zlib1g-dev zlib libssl-dev libyaml-dev > > > libsqlite3-0 libsqlite3-dev sqlite3 libxml2- dev libxslt-dev > > > autoconf libc6-dev ncurses-dev automake libtool bison > > > > rvm install 1.9.2 > > > > rvm use 1.9.2 > > > > rvm --default use 1.9.2 > > > > RAILS SETUP 1 > > > gem install rails > > > > Added the following to my Gemfile > > > gem ''execjs'' > > > gem ''therubyracer'' > > > > bundle install > > > > rails s (saw my application locally on port 3000) > > > > APACHE2 Setup > > > > sudo aptitude install apache2 > > > > Passenger Setup > > > > gem install passenger > > > > passenger-install-apache2-module > > > > Added the following to /etc/apache2/apache2.conf LoadModule > > > passenger_module /home/user/.rvm/gems/ruby-1.9.2- p290/gems/ > > > passenger-3.0.11/ext/apache2/mod_passenger.so > > > PassengerRoot /home/user/.rvm/gems/ruby-1.9.2-p290/gems/ > > > passenger-3.0.11 > > > PassengerRuby /home/user/.rvm/wrappers/ruby-1.9.2-p290/ > > > > restarted apache2 > > > > Creating My Site > > > > Created directory www in my home directory > > > > rails new site -d mysql > > > > Added the following to /etc/apache2/sites-available/site > > > <VirtualHost *:80> ServerName localhost ServerAlias localhost > > > DocumentRoot /home/vmcilwain/www/site/public </VirtualHost> > > > > sudo a2ensite site > > > > sudo a2enmod rewrite > > > > sudo service apache2 reload > > > > Attempted to hit the application with the browser (http://localhost) > > > and I get: It Works! (Apache standard page) Attempt to hit the > > > application with the location http://localhost/siteandIget: Not > > > Found The requested URL /site was not found on this server > > > > According to the guide, I should have seen the welcome aboard page of the site application in my www directory. > > > > I can''t be this hopeless, what else can I be doing wrong :-/ Any help again is greatly appreciated. > > > > On Dec 14, 3:10 am, mg1313 <mirceag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Try the documentation from here:http://www.mirceagoia.com/2011/11/ruby-on-rails-installation-ubuntu-l... > > > > > Mircea > > > > > On Dec 13, 10:52 pm, Vell <lovell.mcilw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > Hello all, > > > > > > Can anyone point me to any solid documentation on how to set up > > > > > a production server using RVM, Passenger, and Apache2? I have > > > > > been at this for a week with absolutely no luck at all so I > > > > > thought I would post here to see if anyone has managed to get > > > > > this to work and written down the steps they used. > > > > > > Right now with my current implementation, I am getting a 404 > > > > > error when I attempt to locally point my browser to a basic > > > > > rails application. > > > > > > I am attempting to set this up on an Ubuntu 11.10 system. > > > > > > Any help would be greatly appreciated. > > > > > > Thanks in advance. > > > > -- > > > 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-talk-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm. > > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.