Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am running into some issues getting my RoR production server up and running using rvm, passenger, and apache2. I was wondering if anyone could help me out. I am new to ubuntu and it is also my first time setting up a production rails environment using RVM.

Right now with my current setup, when I try to connect to localhost/site-name I get requested url not found from apache.

Here are what my config files look like after having installed rvm, apache2, and passenger.

/etc/apache2/httpd.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>

I then create my rail app, run rake db:create to create my database then try to connect via the browser. Which is where I am hitting my snag.

Any help is greatly appreciated and I apologize if this question was answered and I was not able to find it.

share|improve this question
    
More information is needed, what do you mean by "Which is where I am hitting my snag" ? –  bodhi.zazen Dec 12 '11 at 6:19
    
Are you saying that you can't connect to the server? –  jrg Dec 12 '11 at 11:29

2 Answers 2

You should go into the directory for your application and then run the server

ie

rails new myApp
cd myApp
rails server

after the server starts, go to your browser and type localhost:3000. You should get a Welcome aboard sign.

share|improve this answer

Did you get a 404? What does the apache error log say?

Also, your DocumentRoot and Directory doesn't match. Is it intended? Is one a symlink of the other?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.