本文介绍了让ffmpeg与Heroku合作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图为我的Heroku Rails应用程序安装ffmpeg,现在我的应用程序崩溃了。



我使用以下命令添加了一个buildpack:

  heroku config:add BUILDPACK_URL = https://github.com/shunjikonishi/heroku-buildpack-ffmpeg 

推送到Heroku后,根据我的日志收到以下错误:

  2013-11-17T17:50:44.022351 + 00:00 heroku [web.1]:使用命令`bundle exec rails server -p 47171`启动过程
2013-11-17T17: 50:46.295602 + 00:00 app [web.1]:bash:bundle:command not found
2013-11-17T17:50:47.589491 + 00:00 heroku [web.1]:进程退出状态127
2013-11-17T17:50:47.597968 + 00:00 heroku [web.1]:状态从开始变为崩溃
2013-11-17T17:50:48.620853 + 00:00 heroku [router ]:at = error code = H10 desc =App crashedmethod = GET path = /(...)fwd =76.118.180.235dyno = connect = service = status = 503 bytes =
2013-11 -17T17:50:48.847288 + 00:00 heroku [rou ter]:at = error code = H10 desc =App crashedmethod = GET path = / favicon.ico host =(...)fwd =76.118.180.235dyno = connect = service = status = 503 bytes =

当我运行 heroku运行rake db:migrate 时,我收到错误:

 运行`rake db:migrate`附加到终端... up,run.9791 
(in / app )
rake aborted!
没有这样的文件加载 - bundler / setup
< internal:lib / ruby​​gems / custom_require>:29:在`require'
< internal:lib / ruby​​gems / custom_require> ;: 29:在`require'
/app/config/boot.rb:6:in`< top(required)>'
< internal:lib / ruby​​gems / custom_require>:29:in `require'
< internal:lib / ruby​​gems / custom_require>:29:在`require'
/app/config/application.rb:1:in`< top(required)>'
< internal:lib / ruby​​gems / custom_require>:29:在`require'中
< internal:lib / ruby​​gems / custom_require>:29:在`require'
/ app / Rakefile :5:在`< top(required)>'
/usr/local/lib/ruby/1.9.1/rake.rb:2373:in`load'
/ usr / local / lib / ruby​​ / 1.9.1 / rake.rb:2373:在`raw_load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:2007:in`block in load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:2058:in`standard_exception_handling'
/usr/local/lib/ruby/1.9.1/rake.rb:2006:in`load_rakefile '
/usr/local/lib/ruby/1.9.1/rak e.rb:1991:在`run'
/ usr / local / bin / rake:31:在`< main>'

当我查看我正在使用的bundler的版本(bundle show bundler)时,我得到:

 code> / Users /(...)。rvm / gems / ruby​​-1.9.3-p448 / gems / bundler-1.3.5 / lib / bundler.rb:284:warning:Insecure world writable dir / usr / local in PATH,mode 040777 
/Users/(...)/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5

如何解决这个问题?

解决方案

您已经用FFMpeg构建包替换了Ruby buildpack。那不行。您仍然需要包含Ruby buildpack来运行Rails应用程序。



您可以使用ddollar的heroku buildpack-multi -



然后,您可以将.buildpacks文件添加到项目的根目录,其中包含标准的Ruby buildpack和FFMpeg buildpack。


I attempted to install ffmpeg for my Heroku Rails app and now my app is crashing.

I added a buildpack using the following command:

heroku config:add BUILDPACK_URL=https://github.com/shunjikonishi/heroku-buildpack-ffmpeg

After pushing to Heroku, I get the following error according to my logs:

2013-11-17T17:50:44.022351+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 47171`
2013-11-17T17:50:46.295602+00:00 app[web.1]: bash: bundle: command not found
2013-11-17T17:50:47.589491+00:00 heroku[web.1]: Process exited with status 127
2013-11-17T17:50:47.597968+00:00 heroku[web.1]: State changed from starting to crashed
2013-11-17T17:50:48.620853+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ (...) fwd="76.118.180.235" dyno= connect= service= status=503 bytes=
2013-11-17T17:50:48.847288+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=(...) fwd="76.118.180.235" dyno= connect= service= status=503 bytes=

When I run heroku run rake db:migrate, I get the error:

Running `rake db:migrate` attached to terminal... up, run.9791
(in /app)
rake aborted!
no such file to load -- bundler/setup
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/app/config/boot.rb:6:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/app/config/application.rb:1:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/app/Rakefile:5:in `<top (required)>'
/usr/local/lib/ruby/1.9.1/rake.rb:2373:in `load'
/usr/local/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/usr/local/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
/usr/local/lib/ruby/1.9.1/rake.rb:1991:in `run'
/usr/local/bin/rake:31:in `<main>'

When I check the version of bundler I'm using (bundle show bundler), I get:

/Users/(...).rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler.rb:284: warning: Insecure world writable dir /usr/local in PATH, mode 040777
/Users/(...)/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5

How can I solve this problem?

解决方案

You have replaced the Ruby buildpack with the FFMpeg buildpack. That doesn't work. You still need to include the Ruby buildpack to run a Rails app.

You can do this by using ddollar's heroku buildpack-multi - https://github.com/ddollar/heroku-buildpack-multi

You would then add a .buildpacks file to the root directory of your project that includes both the standard Ruby buildpack and your FFMpeg buildpack.

这篇关于让ffmpeg与Heroku合作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-14 01:53