Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails &引用;没有这样的文件或目录;在Heroku上部署带有精简服务器的Rails应用程序时出错_Ruby On Rails_Heroku_Thin - Fatal编程技术网

Ruby on rails &引用;没有这样的文件或目录;在Heroku上部署带有精简服务器的Rails应用程序时出错

Ruby on rails &引用;没有这样的文件或目录;在Heroku上部署带有精简服务器的Rails应用程序时出错,ruby-on-rails,heroku,thin,Ruby On Rails,Heroku,Thin,在尝试使用将Rails应用程序切换到精简服务器后,我在heroku日志中遇到此错误,我的应用程序无法启动 2012-03-12T17:00:46+00:00 heroku[web.1]: Starting process with command `bundle exec rails server thin -p 42557 -e production/production` 2012-03-12T17:00:56+00:00 app[web.1]: DEPRECATION WARNING:

在尝试使用将Rails应用程序切换到精简服务器后,我在heroku日志中遇到此错误,我的应用程序无法启动

2012-03-12T17:00:46+00:00 heroku[web.1]: Starting process with command `bundle exec rails server thin -p 42557 -e production/production` 
2012-03-12T17:00:56+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5) 
2012-03-12T17:00:56+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5) 
2012-03-12T17:00:56+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or

2012-03-12T17:01:00+00:00 app[web.1]: => Booting Thin 
2012-03-12T17:01:00+00:00 app[web.1]: => Rails 3.2.1 application starting in production on http://0.0.0.0:42557 
2012-03-12T17:01:00+00:00 app[web.1]: => Call with -d to detach 
2012-03-12T17:01:00+00:00 app[web.1]: => Ctrl-C to shutdown server 
2012-03-12T17:01:00+00:00 app[web.1]: Exiting 
2012-03-12T17:01:00+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/rack/log_tailer.rb:8:in `size': No such file or directory - log/production/production.log (Errno::ENOENT) 
2012-03-12T17:01:00+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/rack/log_tailer.rb:8:in `initialize' 
2012-03-12T17:01:00+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:295:in `new' 
2012-03-12T17:01:00+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:295:in `block in build_app' 
2012-03-12T17:01:00+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:291:in `reverse_each' 
2012-03-12T17:01:00+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:291:in `build_app' 
2012-03-12T17:01:00+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app' 
2012-03-12T17:01:00+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:252:in `start' 
2012-03-12T17:01:00+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands/server.rb:70:in `start' 
2012-03-12T17:01:00+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:55:in `block in <top (required)>' 
2012-03-12T17:01:00+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in `tap' 
2012-03-12T17:01:00+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in `<top (required)>' 
2012-03-12T17:01:00+00:00 app[web.1]: from script/rails:6:in `require' 
2012-03-12T17:01:00+00:00 app[web.1]: from script/rails:6:in `<main>' 
2012-03-12T17:01:01+00:00 heroku[web.1]: Process exited with status 1 
2012-03-12T17:01:01+00:00 heroku[web.1]: State changed from starting to crashed
2012-03-12T17:00:46+00:00 heroku[web.1]:使用命令“bundle exec rails server thin-p 42557-e production/production”启动进程
2012-03-12T17:00:56+00:00应用程序[web.1]:弃用警告:供应商/插件中有Rails 2.3样式的插件!对这些插件的支持将在Rails 4.0中删除。将它们移出并打包到您的Gemfile中,或者将它们作为lib/myplugin/*和config/initializers/myplugin.rb折叠到您的应用程序中。有关这方面的更多信息,请参阅发行说明:http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released. (从at/app/config/environment.rb:5调用)
2012-03-12T17:00:56+00:00应用程序[web.1]:弃用警告:供应商/插件中有Rails 2.3样式的插件!对这些插件的支持将在Rails 4.0中删除。将它们移出并打包到您的Gemfile中,或者将它们作为lib/myplugin/*和config/initializers/myplugin.rb折叠到您的应用程序中。有关这方面的更多信息,请参阅发行说明:http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released. (从at/app/config/environment.rb:5调用)
2012-03-12T17:00:56+00:00应用程序[web.1]:弃用警告:供应商/插件中有Rails 2.3样式的插件!对这些插件的支持将在Rails 4.0中删除。将它们移出并打包到您的GEM文件中,或者
2012-03-12T17:01:00+00:00应用程序[web.1]:=>启动精简
2012-03-12T17:01:00+00:00应用程序[web.1]:=>Rails 3.2.1应用程序于http://0.0.0.0:42557 
2012-03-12T17:01:00+00:00应用程序[web.1]:=>使用-d调用以分离
2012-03-12T17:01:00+00:00应用程序[web.1]:=>Ctrl-C关闭服务器
2012-03-12T17:01:00+00:00应用程序[web.1]:退出
2012-03-12T17:01:00+00:00应用程序[web.1]:/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/log\u tailer.rb:8:“大小”:没有这样的文件或目录-log/production/production.log(Errno::enoint)
2012-03-12T17:01:00+00:00应用程序[网站1]:from/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/rack/log_tailer.rb:8:在“初始化”中
2012-03-12T17:01:00+00:00应用程序[web.1]:from/app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:295:in'new'
2012-03-12T17:01:00+00:00应用程序[web.1]:from/app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:295:in“block in build_应用程序”
2012-03-12T17:01:00+00:00应用程序[web.1]:from/app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:291:在“反向”中
2012-03-12T17:01:00+00:00应用程序[web.1]:from/app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:291:in'build_应用程序'
2012-03-12T17:01:00+00:00应用程序[web.1]:from/app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:301:in'wrapp'
2012-03-12T17:01:00+00:00应用程序[web.1]:from/app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:252:在“开始”中
2012-03-12T17:01:00+00:00应用程序[web.1]:from/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands/server.rb:70:在“开始”中
2012-03-12T17:01:00+00:00应用程序[web.1]:from/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:55:in'block in'
2012-03-12T17:01:00+00:00应用程序[web.1]:from/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in'tap'
2012-03-12T17:01:00+00:00应用程序[web.1]:from/app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in`'
2012-03-12T17:01:00+00:00应用程序[web.1]:来自脚本/rails:6:in'require'
2012-03-12T17:01:00+00:00应用程序[web.1]:来自脚本/rails:6:in`'
2012-03-12T17:01:01+00:00 heroku[web.1]:进程已退出,状态为1
2012-03-12T17:01:01+00:00 heroku[web.1]:状态从开始更改为崩溃
破坏一切的实际错误似乎是:

没有这样的文件或目录-log/production/production.log(Errno::enoint)

我需要做什么才能让这一切消失?我甚至在
log/production/production.log
中手动添加了一个空文件,并从
.gitignore
中删除了日志文件,以便在推送到Heroku后它仍然存在,但我仍然得到了错误


如果有帮助的话,.

解决方案:我删除了procfile(根据建议,这不是必需的,只是为了完全控制),现在一切似乎正常。但仍然不确定问题是什么。

可能与此问题有关

  • 尝试删除
    config/environment.rb和
    config/environments/production.rb中的
    config.logger=logger.new(STDOUT)

  • 程序文件中使用
    web:bundle exec rails server thin-p$PORT-e$rails\u ENV


  • 您在哪里配置应用程序的日志记录?为什么它是
    log/production/production.log
    而不是
    log/production.log
    像normal一样有同样的问题,删除Procfile也解决了这个问题。问题仅在升级到Rails 3.2.2后开始。我的理解是procfiles用于管理多个进程,因此对于一个基本的应用程序来说,它可能不需要。不管怎样,我也想知道为什么会这样:)后者帮我解决了。谢谢