Ruby on Rails and Phusion Passenger on Mac with OS "Snow Leopard" problem
I'm trying to deploy my application using Ruby on Rails and Phusion Passenger on my Mac with OS "Snow Leopard" v10.6.5. I read lots of guides on the Internet and I got a headache!
What I did is:
1 . I installed Passenger as described here.
2 . I edited the '/private/etc/apache2/httpd.conf' file adding these code lines:
LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-3.0.2/ext/apache2/mod_passenger.so
PassengerRoot /Library/Ruby/Gems/1.8/gems/passenger-3.0.2
PassengerRuby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
3 . I restarted apache from the "System Preferences" Panel
Info: at this time if I go to 'http://localhost/' in the browser, I get the common page index.html from 'User/< my_user_name >/Sites/' folder. It seems all work.
4 . I copied the folder of my RoR application (< my_ror_application_name> folder within app directory, config directory, config.ru file, ...) in 'User/< my_user_name >/Sites/'
5 . I edited the '/private/etc/apache2/httpd.conf' file adding these code lines:
< VirtualHost *:80 >
ServerName < my_ror_application_name> .com
DocumentRoot /Library/WebServer/< my_ror_application_name>/public
< / VirtualHost >
6 . I restarted apache from the "Sys开发者_如何学JAVAtem Preferences" Panel
Now if I go to 'http://localhost/' in the browser, I get the "Impossible to find localhost" alert.
I think there is something wrong with the Document root with the step 5 or, maybe, in the public folder of my application...
In my RoR application, the public directory have these files and directories:
- 404.html
- 422.html
- 500.html
- robot.txt
- images directory
- javascripts directory
- stylesheets directory
What's wrong?!
You may want to take a look to passenger pane. For me it works like a charm :)
精彩评论