开发者

Why is passenger not finding my rails root

开发者 https://www.devze.com 2023-04-09 14:03 出处:网络
I have a rails application that i need to be in a subdirectory of an existing application I am trying to deploy this rails application to a sub directory using the help of this link Here is my applic

I have a rails application that i need to be in a subdirectory of an existing application I am trying to deploy this rails application to a sub directory using the help of this link Here is my application here and as you can see i am getting this error (The directory "/srv/www/www.transprintusa.com" does not appear to be a valid Ruby on Rails application root) . my public folder is here

/srv/www/www.transprintusa.com/design/design.transprintusa.com/releases/20110217203009/public/

or with the sym link

/srv/www/www.transprintusa.com/design/design.transprintusa.com/

here is my VHOST

<VirtualHost 184.106.111.142:80>
      ServerAdmin jom@jom.com
      ServerName transprintusa.com
      ServerAlias www.transprintusa.com
      开发者_运维问答DocumentRoot /srv/www/www.transprintusa.com/
      ErrorLog /srv/www/www.transprintusa.com/logs/error.log
      CustomLog /srv/www/www.transprintusa.com/logs/access.log combined
        <Directory "/srv/www/www.transprintusa.com/">
                AllowOverride all
                Options -MultiViews
        </Directory>
 RailsBaseURI /design
    <Directory /srv/www/www.transprintusa.com/design/design.transprintusa.com/releases/20110217203009/public/>
        Options -MultiViews
    </Directory>
</VirtualHost>

I even ran this symlink command i ran also

  ln -s /srv/www/www.transprintusa.com/design/design.transprintusa.com/releases/20110217203009/public/ /srv/www/www.transprintusa.com/design

maybe i am missing something obvious and i just dont see it


Okay - followup on my comment. I'd create the symlink like this (run it from "/srv/www/www.transprintusa.com"):

ln -Ts design/design.transprintusa.com/releases/20110217203009/public/ rails

That'll make a symlink called "rails" in your "/srv/www/www.transprintusa.com" directory (I'm not calling it "design", 'cause it looks like the design subdirectory already exists - that might have been part of your problem).

Then give that symlink as the RailsBaseURI:

RailsBaseURI /rails
<Directory /srv/www/www.transprintusa.com/rails>
    Options -MultiViews
</Directory>

And that's it - restart your server and see if it goes. Hope that helps!

0

精彩评论

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

关注公众号