Tired of juggling multiple Rails apps around with script/server? See how to set up Passenger in development so each one has its own local domain name.
Sorry to make this platform specific. It looks like Passenger isn’t available on Windows.
Sorry to make this platform specific. It looks like Passenger isn’t available on Windows.
sudo gem install passenger
sudo passenger-install-apache2-module
mate /etc/apache2/httpd.conf
sudo apachectl graceful
mate /etc/hosts
tail -f log/development
touch tmp/restart.txt
# /etc/apache2/httpd.conf
LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-2.0.2/ext/apache2/mod_passenger.so
PassengerRoot /Library/Ruby/Gems/1.8/gems/passenger-2.0.2
PassengerRuby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
NameVirtualHost *:80
<VirtualHost *:80>
ServerName railscasts.local
DocumentRoot "/Users/rbates/code/railscasts/public"
RailsEnv development
RailsAllowModRewrite off
<directory "/Users/rbates/code/railscasts/public">
Order allow,deny
Allow from all
</directory>
</VirtualHost>
# /etc/hosts
127.0.0.1 railscasts.local
Passenger配置
本文介绍如何使用Passenger简化Rails应用的开发流程,通过设置让每个应用都有独立的本地域名。
2207

被折叠的 条评论
为什么被折叠?



