Ruby on Rails Monday, June 30, 2014



Server admin in snow leopard is now server.app in Mavericks?

Liying

On Saturday, June 28, 2014 8:41:11 AM UTC-4, Jim wrote:

I followed your advice, still couldn't get my site running. Do you set up your rails project in
Mac OSX Mavericks? It seems from its instruction, /etc/apache2/httpd.conf is
/Library/Server/Web/Config/apache2/httpd_server_app.conf 

Are you using Server.app?  If so, then things are somewhat different.  In fact, looking back at your original message I see you mentioned a Server-specific path.  

You would want to put your passenger.conf file in /Library/Server/Web/Config/apache2/other/.  

You can still edit your /etc/hosts file to include a local domain for your project, which will make things easier.  You would then set up a new website in Server.app, using the domain you set up /etc/hosts for your project, and tell it site files are stored in the public folder of your rails project.  I use RVM, so I have to edit the config file Server.app generates to add

PassengerRuby /usr/local/rvm/gems/ruby-2.1.2@my_gemset/wrappers/ruby

You can run this command from your rails project directory to see what you should be using for PassengerRuby:

passenger-config --ruby-command

If you want to run your rails app in development mode, you'll also need to add 

    RackEnv development

to your site config file.  Your site config file will be in:

/Library/Server/Web/Config/apache2/sites/

and will be named something like:

0000_any_80_my.project.domain.conf

Your passenger installation doesn't necessarily need to be done via rbenv, it will be just fine installed with the system ruby.  However, you will need the PassengerRuby directive so it knows where to find the ruby and gem set to use when it instantiates your project.

Jim

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a54c08c8-2636-4a90-825e-1342c3d744ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment