让ffmpeg与Heroku一起工作

sci*_*fic 6 ffmpeg ruby-on-rails heroku bundler

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

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

heroku config:add BUILDPACK_URL=https://github.com/shunjikonishi/heroku-buildpack-ffmpeg
Run Code Online (Sandbox Code Playgroud)

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

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=
Run Code Online (Sandbox Code Playgroud)

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

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>'
Run Code Online (Sandbox Code Playgroud)

当我检查我正在使用的捆绑包的版本(捆绑显示捆绑包)时,我得到:

/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
Run Code Online (Sandbox Code Playgroud)

我怎么解决这个问题?

Pet*_*ein 8

您已使用FFMpeg buildpack替换了Ruby buildpack.这不起作用.您仍然需要包含Ruby buildpack来运行Rails应用程序.

你可以通过使用ddollar的heroku buildpack-multi来实现这一点 - https://github.com/ddollar/heroku-buildpack-multi

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