Ruby on rails 在Rails上运行应用程序时,首先执行应用程序的哪个文件?

Ruby on rails 在Rails上运行应用程序时,首先执行应用程序的哪个文件?,ruby-on-rails,ruby-on-rails-3,Ruby On Rails,Ruby On Rails 3,请对此负责。给出rails s时执行的应用程序的第一个文件 我需要知道申请项目的启动情况 提前感谢。键入哪些rails将为您提供答案 然后打开文件,如下所示: #!/usr/bin/env ruby1.9.1 # # This file was generated by RubyGems. # # The application 'railties' is installed as part of a gem, and # this file is here to facilitate runn

请对此负责。给出
rails s
时执行的应用程序的第一个文件

我需要知道申请项目的启动情况


提前感谢。

键入
哪些rails
将为您提供答案

然后打开文件,如下所示:

#!/usr/bin/env ruby1.9.1
#
# This file was generated by RubyGems.
#
# The application 'railties' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'rubygems'

version = ">= 0"

if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
  version = $1
  ARGV.shift
end

gem 'railties', version
load Gem.bin_path('railties', 'rails', version)

执行的第一个应用程序文件通常是
config/boot.rb

然后,
config/environment.rb
,它通常会加载
config/environments/
中的一个文件(运行哪个文件取决于已设置的环境)

然后将执行
config/application.rb


此后,
config/routes.rb将向服务器提供有关如何处理传入请求的关键信息

在Rails上运行的应用程序流可在此处找到。

..]$
rails s

背景过程

{

}

[服务器在此启动/显示在终端中]

=> Booting WEBrick

=> Rails 3.2.6 application starting in development on http://0.0.0.0:3000

=> Call with -d to detach

=> Ctrl-C to shutdown server
> INFO  WEBrick 1.3.1
> INFO  ruby 1.9.3 ('Date') [i686-linux]
> INFO  WEBrick::HTTPServer#start: pid=3031 port=3000
背景过程

{

}

[服务器从这里开始/显示在终端中]

=> Booting WEBrick

=> Rails 3.2.6 application starting in development on http://0.0.0.0:3000

=> Call with -d to detach

=> Ctrl-C to shutdown server
> INFO  WEBrick 1.3.1
> INFO  ruby 1.9.3 ('Date') [i686-linux]
> INFO  WEBrick::HTTPServer#start: pid=3031 port=3000

这真的很有用。谢谢。但是我需要知道应用程序项目的启动。