错误:找不到application.yml,请参阅config / application.yml.example

时间:2016-08-19 14:03:34

标签: ruby-on-rails

我在rails应用程序上运行我的ruby,它运行正常。由于某些应用程序要求,我必须在config文件夹中的application.yml文件中进行更改。所以我在application.yml.example文件中进行了这些更改,然后用application.yml.example替换了现有的application.yml文件。

所以新的application.yml有我想要的所有修改。但在此之后,当我运行我的应用程序时,Phusion乘客给了我错误:

application.yml not found, see config/application.yml.example

但application.yml存在于我的应用程序中,我刚刚修改了它的内容。

这是我的日志文件:

FakeEpicServer#start done.
Starting fake epic server
WEBrick 1.3.1
ruby 2.1.5 (2014-11-13) [x86_64-linux]
FakeEpicServlet is mounted on /.
#<WEBrick::HTTPServlet::ProcHandler:0x007f87bfd9fa50 @proc=# <Proc:0x007f87bfd9fb18 (lambda)>> is mounted on /wsdl.
FakeEpicServer#start: pid=19222 port=56043
Creating epic interface
close TCPSocket(0.0.0.0, 56043)
close TCPSocket(::, 56043)
going to shutdown ...
FakeEpicServer#start done.

Phusion完全错误:

  /opt/cnmc-sparc-request-master-june/config/initializers/audit_trail.rb:27:in `rescue in <top (required)>'
  /opt/cnmc-sparc-request-master-june/config/initializers/audit_trail.rb:23:in `<top (required)>'
  /opt/cnmc-sparc-request-master-june/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `load'
  /opt/cnmc-sparc-request-master-june/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `block in load'
  /opt/cnmc-sparc-request-master-june/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
  /opt/cnmc-sparc-request-master-june/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `load'
  /opt/cnmc-sparc-request-master-june/vendor/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/engine.rb:652:in `block in load_config_initializer'
  /opt/cnmc-sparc-request-master-june/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.4/lib/active_support/notifications.rb:166:in `instrument'
  /opt/cnmc-sparc-request-master-june/vendor/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/engine.rb:651:in `load_config_initializer'
  /opt/cnmc-sparc-request-master-june/vendor/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
  /opt/cnmc-sparc-request-master-june/vendor/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/engine.rb:615:in `each'
  /opt/cnmc-sparc-request-master-june/vendor/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/engine.rb:615:in `block in <class:Engine>'
  /opt/cnmc-sparc-request-master-june/vendor/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/initializable.rb:30:in `instance_exec'
  /opt/cnmc-sparc-request-master-june/vendor/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/initializable.rb:30:in `run'
  /opt/cnmc-sparc-request-master-june/vendor/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/initializable.rb:55:in `block in run_initializers'
 /home/mskhan2/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
 /home/mskhan2/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
 /home/mskhan2/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from'
  /home/mskhan2/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
  /home/mskhan2/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from'
  /opt/cnmc-sparc-request-master-june/vendor/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/initializable.rb:44:in `each'
  /opt/cnmc-sparc-request-master-june/vendor/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/initializable.rb:44:in `tsort_each_child'
 /home/mskhan2/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:411:in `call'
  /home/mskhan2/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:411:in `each_strongly_connected_component_from'
 /home/mskhan2/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
 /home/mskhan2/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:345:in `each'
 /home/mskhan2/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:345:in `call'
 /home/mskhan2/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
 /home/mskhan2/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
 /home/mskhan2/.rbenv/versions/2.1.5/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
 /opt/cnmc-sparc-request-master-june/vendor/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/initializable.rb:54:in `run_initializers'
 /opt/cnmc-sparc-request-master-june/vendor/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/application.rb:352:in `initialize!'
 /opt/cnmc-sparc-request-master-june/vendor/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/railtie.rb:194:in `public_send'
 /opt/cnmc-sparc-request-master-june/vendor/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/railtie.rb:194:in `method_missing'
 /opt/cnmc-sparc-request-master-june/config/environment.rb:25:in `<top (required)>'
config.ru:23:in `require'
config.ru:23:in `block in <main>'
/opt/cnmc-sparc-request-master-june/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
/opt/cnmc-sparc-request-master-june/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/home/mskhan2/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/passenger-5.0.29/src/helper-scripts/rack-preloader.rb:110:in `eval'
/home/mskhan2/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/passenger-5.0.29/src/helper-scripts/rack-preloader.rb:110:in `preload_app'
 /home/mskhan2/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/passenger-5.0.29/src/helper-scripts/rack-preloader.rb:156:in `<module:App>'
 /home/mskhan2/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/passenger-5.0.29/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
 /home/mskhan2/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/passenger-5.0.29/src/helper-scripts/rack-preloader.rb:29:in `<main>'

文件权限:

mskhan2@askeott:/opt/cnmc-sparc-request-master-june/config$ stat application.yml
File: ‘application.yml’
Size: 7913          Blocks: 16         IO Block: 4096   regular file
Device: fc00h/64512d    Inode: 1309105     Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1010/ mskhan2)   Gid: ( 1012/ mskhan2)
Access: 2016-08-19 14:43:23.663483744 -0400
Modify: 2016-08-19 14:43:00.823483523 -0400
Change: 2016-08-19 14:43:00.823483523 -0400
Birth: -
=============================================================================
mskhan2@askeott:/opt/cnmc-sparc-request-master-june/config$ stat database.yml
File: ‘database.yml’
Size: 2252          Blocks: 8          IO Block: 4096   regular file
Device: fc00h/64512d    Inode: 1352614     Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1010/ mskhan2)   Gid: ( 1012/ mskhan2)
Access: 2016-08-19 11:02:36.987355521 -0400
Modify: 2016-06-30 12:18:54.033583629 -0400
Change: 2016-06-30 12:18:54.045583629 -0400
Birth: -

0 个答案:

没有答案