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 <[email protected]> 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: [email protected] > [mailto:[email protected]] 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 <[email protected]> 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 <[email protected]> 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: [email protected] > > > [mailto:[email protected]] 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 <[email protected]> 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 <[email protected]> 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 [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]. > > > 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]. > 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

