开发者

change rails app from webrick to passenger

Need some help moving a rails app from webrick to passenger with apache. Im very new to all this and i cant get it running with passenger. I have tried a bunch of guides and I am not getting any errors apart from the rails server always using webrick instead of passenger. I am working on mac mini OSX as server

I seen that osx comes with a version of mac already installed but i read online that i should load a newer copy so i make sure that the currently installed apache is not running in system preferences/sharing/web sharing.

then i brew install apachetop. followed by gem install passenger and passenger-install-apache2-module .

I then follow the instructions from passenger in terminal which asks me to place some code in the httpd.conf file. which i find in /ect/apache2 from root.

I then add the virtual host info to the apache开发者_JS百科 config file too where /public/mom is location of my rails app.

<VirtualHost *>
    ServerName localhost:3000
    DocumentRoot /public/mom
    RailsEnv development 
    <Directory /public/mom>
         AllowOverride all
         Options -MultiViews
    </Directory>
</VirtualHost>

I then make sure apache is running with sudo apachectl start and try running my rails server but it still runs using webrick.

I have seen posts saying that i need to make sure that passenger is installing with the correct version of apache that i installed. how do i force passenger to install with the apache i installed rather then default? am i ment to be naming the servername within the config file as localhost? Can anyone give me some guidance on how to get the rails app running with passenger . maybe i missed some steps or misunderstood the process completely. thanks

edit: below is apache error_log

    [Wed Jul 20 19:17:01 2011] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
httpd: Could not reliably determine the server's fully qualified domain name, using mini.local for ServerName
[Wed Jul 20 19:17:02 2011] [notice] Digest: generating secret for digest authentication ...
[Wed Jul 20 19:17:02 2011] [notice] Digest: done
[Wed Jul 20 19:17:02 2011] [notice] Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8r DAV/2 Phusion_Passenger/3.0.7 configured -- resuming normal operations
[Wed Jul 20 19:17:22 2011] [notice] caught SIGTERM, shutting down
[Wed Jul 20 19:39:32 2011] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
httpd: Could not reliably determine the server's fully qualified domain name, using mini.local for ServerName
[Wed Jul 20 19:39:45 2011] [notice] Digest: generating secret for digest authentication ...
[Wed Jul 20 19:39:45 2011] [notice] Digest: done
[Wed Jul 20 19:39:45 2011] [notice] Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8r DAV/2 Phusion_Passenger/3.0.7 configured -- resuming normal operations
[Wed Jul 20 19:43:33 2011] [notice] caught SIGTERM, shutting down
[Wed Jul 20 20:09:35 2011] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
Warning: DocumentRoot [/public/mom] does not exist
httpd: Could not reliably determine the server's fully qualified domain name, using mini.local for ServerName
[Wed Jul 20 20:09:35 2011] [notice] Digest: generating secret for digest authentication ...
[Wed Jul 20 20:09:35 2011] [notice] Digest: done
[Wed Jul 20 20:09:35 2011] [notice] Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8r DAV/2 Phusion_Passenger/3.0.7 configured -- resuming normal operations
[Thu Jul 21 10:36:59 2011] [notice] caught SIGTERM, shutting down


"try running my rails server but it still runs using webrick", seems your webrick is still active.

lsof -i -P |grep 3000
kill -9 WEBRICK_PID
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜