为什么乘客找不到我的铁轨根
我有一个 Rails 应用程序,我需要将其放在现有应用程序的子目录中 我正在尝试使用此链接<的帮助将此rails应用程序部署到子目录< /a> 这是我的应用程序此处,正如您所看到的,我收到此错误(目录“/srv/www/www.transprintusa.com”似乎不是有效的 Ruby on Rails 应用程序根目录) 。我的公共文件夹在这里
/srv/www/www.transprintusa.com/design/design.transprintusa.com/releases/20110217203009/public/
或者符号链接
/srv/www/www.transprintusa.com/design/design.transprintusa.com/
在这里是我的VHOST
<VirtualHost 184.106.111.142:80>
ServerAdmin [email protected]
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>
我什至运行了这个符号链接命令我也运行了
ln -s /srv/www/www.transprintusa.com/design/design.transprintusa.com/releases/20110217203009/public/ /srv/www/www.transprintusa.com/design
也许我错过了一些明显的东西而我只是没有看到它
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 [email protected]
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的 - 跟进我的评论。我会像这样创建符号链接(从“/srv/www/www.transprintusa.com”运行它):
这将在“/srv/www/www.transprintusa.com”中创建一个名为“rails”的符号链接目录(我没有将其称为“设计”,因为它看起来设计子目录已经存在 - 这可能是您问题的一部分)。
然后将该符号链接作为 RailsBaseURI:
就是这样 - 重新启动服务器并查看它是否正常。希望有帮助!
Okay - followup on my comment. I'd create the symlink like this (run it from "/srv/www/www.transprintusa.com"):
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:
And that's it - restart your server and see if it goes. Hope that helps!