gpt4 book ai didi

ruby-on-rails - 让 ffmpeg 与 Heroku 一起工作

转载 作者:行者123 更新时间:2023-12-04 13:27:26 25 4
gpt4 key购买 nike

我试图为我的 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]: 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=

当我运行 heroku 运行 rake db:迁移 ,我得到错误:
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>'

当我检查我正在使用的 bundler 版本( bundle 显示 bundler )时,我得到:
/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

我怎么解决这个问题?

最佳答案

您已将 Ruby buildpack 替换为 FFMpeg buildpack。那是行不通的。您仍然需要包含 Ruby buildpack 才能运行 Rails 应用程序。

您可以使用 ddollar 的 heroku buildpack-multi - https://github.com/ddollar/heroku-buildpack-multi 来做到这一点。

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

关于ruby-on-rails - 让 ffmpeg 与 Heroku 一起工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20034148/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com