Jump to content

The ultimate community for Ruby on Rails developers.


Unable to set up Rails app by Apache on Mac OS X Mavericks

  • Please log in to reply
2 replies to this topic

#1 Liz



  • Members
  • 1 posts

Posted 23 June 2014 - 05:50 PM


I just upgrade a few apps from Rails 2.3.18 to Rails 4.0.4 and make sure
the apps are running on WEBrick. I follow the steps I have done to set up
apps by Apache on Snow Leopard, first install passenger and add the following to /etc/apache2/httpd.conf

  LoadModule passenger_module /usr/local/opt/passenger/libexec/buildout/apache2/mod_passenger.so

  PassengerRoot /usr/local/opt/passenger/libexec/lib/phusion_passenger/locations.ini

  PassengerDefaultRuby /usr/bin/ruby

then try to add RailsBaseURI /most (most is my rail project) in the .conf  inside /etc/apache2/sites/,
but no .conf file there anymore for Mac Marvericks, rather I find the .conf in folder

apache2/sites, so I add the "RailsBaseURI /most" in the

Then I add a symlink as following:

ln -s /Library/WebServer/most/public /Library/WebServer/Documents/most


sudo apachectl stop
sudo apachectl start

Page http://localhost/most is like following:

Index of /most Apache/2.2.26 (Unix) Phusion_Passenger/4.0.41 mod_ssl/2.2.26 OpenSSL/0.9.8y DAV/2 mod_wsgi/3.3 Python/2.7.5 Server at localhost Port 80
and couldn't display http://localhost/mos...generator/index     (rannumgenerator is controller I generated in most project).

Wonder if something that I should do for Mac Mavericks or some setting for Apache that I am not aware?

Thanks a lot!


#2 lightbecorp



  • Members
  • 10 posts

Posted 25 November 2014 - 05:40 PM

When I started using Passenger I was running Lion.  After contacting working with one of the developers I found out that starting with Lion the passenger statements need to go in /Library/Server/Web/Config/apache2/httpd_server_app.conf.  In this file do a find on Virtual hosts in that file and comment out the Include /private/etc/apache2/extra/httpd-vhosts.conf statement near the bottom of the config file.  Put your Passenger virtual host information in /private/etc/apache2/extra/httpd-vhosts.conf.

#3 Tomer



  • Members
  • 4 posts

Posted 15 February 2015 - 10:34 AM

So I'm learning Rails and through Udemy tutorial.
The app runs just fine on the local development server on MAC however i keep getting :

Missing partial layout/_header with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder]}. Searched in:
* "/Users/Tomer/.rvm/gems/ruby-2.2.0/gems/web-console-2.0.0/lib/action_dispatch/templates"
* "/Users/Tomer/Desktop/tomerdemo/app/views"
Extracted source (around line #10):
<%= render 'layout/header' %>

<%= yield %>

Pls someone out there!?

Attached Thumbnails

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users