开发者

When is the environment.rb file loaded in a rails 3 app?

开发者 https://www.devze.com 2023-01-30 07:50 出处:网络
I dont\' see any reference 开发者_运维问答to my environment.rb file in my rails 3 app, I must be not looking at the right place.

I dont' see any reference 开发者_运维问答to my environment.rb file in my rails 3 app, I must be not looking at the right place.

Is it called differenlty now, I thought it was in /public/dispatch.rb?


It's in config.ru. This is a Rack-up file, that any Rack complient server will load when starting the app. It contains something like this:

require ::File.expand_path('../config/environment',  __FILE__)
run YourApp::Application

The first line loads your environment. The second line tells the Rack server that your application is the Rack application to load.

0

精彩评论

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