钢轨3.2.10
乘客3.0.19
Ruby 1.9.3-p392(使用rbenv)
试图让我的rails应用程序通过passenger在我的服务器上运行。获取此错误:
没有要加载的此类文件--路径是app/app/assets/stylesheets/。/config/environment
这是我的Apache配置:

<VirtualHost *:80>
ServerName domain.com
DocumentRoot /srv/http
<Directory /srv/http>
    Allow from all
</Directory>

RackBaseURI /rails_app
RackEnv test
<Directory /srv/http/rails_app>
    Options -MultiViews
</Directory>
</VirtualHost>

(其中/srv/http/rails_app-->path_to_app/public)
我真的不知道它为什么要在assets目录中查找配置文件。这是config.ru(据我所知,这是stock):
require ::File.expand_path('../config/environment',  __FILE__)
run RailsApp::Application

我以前做过,但只有Rails 2.x。我做错什么了吗?
更新:即使尝试从命令行启动测试或生产服务器,也会发生这种情况,因此它不是乘客一个新的Rails应用程序在所有环境下都可以正常工作,所以它必须是一个迁移或gem问题,但我甚至不知道从哪里开始。

最佳答案

结果发现app/assets/stylesheets中有一些奇怪的FCGI文件(dispatch.rb,dispatch.FCGI)一定是Rails2.x应用程序遗留下来的,或者是被意外移动到那里的。

关于ruby-on-rails - Rails 3乘客路径错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/15981416/

10-11 06:41
查看更多