开发者

get 404 with passenger and rails

I'm trying to run a rails app on a shared hoster. I create the app in the directory /home/rails_projects/jens_blog and the document root is /home/www/jens_blog.

In the /home/www/jens_blog dir is a symlink public -> /home/rails_projects/jens_blog/public/ I created a scaffold posts. But when i run the mydomain/ or mydomain/posts in the browser I get always an 404 error. File does not exist: /home/www/jens_blog/public/posts

<VirtualHost ip.port>
    ServerName www.mydomain.de
    ServerAdmin webmaster@www.mydomain.de
    DocumentRoot /home/www/jens_blog/public
    LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.7/ext/apache2/mod_passenger.so
    PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.7
    PassengerRuby /usr/bin/ruby
    PassengerDefaultUser myuser
    PassengerAnalyticsLogUser myuser
    CustomLog /home/log/access_log mesos2
    <Directory "/home/www/jens_blog/public">
        Allow from all
        Options -MultiViews
        Options FollowSymLinks
    </Directory>
</VirtualHost>

if I put a index.php file into the /home/rails_projects/jens_blog/public/ dir the file content will be show. Can anybody help me?? I am desperated. I have only a shared web hosting.

Update: I added "PassengerResolveSymlinksInDocumentRoot 开发者_开发技巧on" to the apache config. But now I get Exception LoadError in PhusionPassenger::Rack::ApplicationSpawner (no such file to load -- bundler) :-((

Cheers Jens


My question was quite similar to yours Deployed rails site on ec2 using capistrano, but it doesn't show up on the browser, here is the site -> http://passionate4.net/

I would say place your site in this directory /var/www/myapp/public.

Use these settings.

ServerName www.passionate4.net

DocumentRoot /var/www/capi_app/current/public

RailsEnv production

Allow from all

Options -MultiViews

I have written couple of blogs on how to successfully deploy the site on Ubuntu. I believe you problem is quite similar to mine. http://recipe4developer.wordpress.com/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜