# Apache2 + mod\_rails

**URL:** <https://www.ruby-forum.com/t/apache2-mod-rails/166073>\
**Category:** Rails\
**Created:** [April 21, 2009, 5:49pm UTC](https://www.ruby-forum.com/t/apache2-mod-rails/166073 "2009-04-21T17:49:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Misantropo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b77776/32.png) [@Misantropo](https://www.ruby-forum.com/u/Misantropo)\
**Post date:** [April 21, 2009, 5:49pm UTC](https://www.ruby-forum.com/t/apache2-mod-rails/166073/1 "2009-04-21T17:49:42Z")

</div>

I followed all instructions in a website for getting mod\_rails  
running. Everything seemed fine but when i try to access my rails app  
keep getting this error message everytime:

We’re sorry, but something went wrong.

We’ve been notified about this issue and we’ll take a look at it  
shortly.

Log files doesn’t take me anywhere

Here is what i did to install mod\_rails on a fresh debian 5 virtual  
machine:

1.- Install Debian  
2.- Install ssh  
apt-get install ssh  
3.- Install Ruby  
apt-get install ruby ri rdoc irb ri1.8 ruby1.8-dev libzlib-ruby  
zlib1g  
4.- Install Gems  
wget [http://rubyforge.org/frs/download.php/55066/rubygems-1.3.2.tgz](http://rubyforge.org/frs/download.php/55066/rubygems-1.3.2.tgz)  
tar zxvf rubygems-1.3.2.tgz  
cd rubygems-1.3.2  
ruby setup.rb  
ln /usr/bin/gem1.8 /usr/bin/gem  
gem update --system  
apt-get install libopenssl-ruby  
5.- Install Rails  
gem install rails -y  
6.- Install mod\_rails prerequisites  
apt-get install make  
apt-get install gcc libc6-dev  
apt-get install build-essential  
apt-get install apache2-prefork-dev  
apt-get install libapr1-dev  
7.- Install Apache2, Php, MySQL, phpmyadmin  
apt-get install apache2 php5 php5-mysql mysql-client mysql-server  
phpmyadmin  
8.- Install mod\_rails  
gem install passenger  
passenger-install-apache2-module  
9.- Configure apache2  
#Add the following lines to apache2.conf  
LoadModule passenger\_module /usr/lib/ruby/gems/1.8/gems/  
passenger-2.2.1/ext/apache2/mod\_passenger.so  
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.1  
PassengerRuby /usr/bin/ruby1.8

---

<div class="post-metadata">

**Author:** ![Misantropo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b77776/32.png) [@Misantropo](https://www.ruby-forum.com/u/Misantropo)\
**Post date:** [April 21, 2009, 7:42pm UTC](https://www.ruby-forum.com/t/apache2-mod-rails/166073/2 "2009-04-21T19:42:22Z")

</div>

Can you be more forthcoming about the errors in the log. I use ubuntu  
and I  
had to change the owner and group access on a few files like  
environment.rb  
to get rails running on ubuntu. This has to do with who the owner is of  
the  
rails app as it runs. In my case both environmet.rb and  
application\_controller.rb has to have owner and group modified.  
Cheers–

Charles
