【发布时间】:2021-02-28 11:14:33
【问题描述】:
我正在尝试通过 Heroku 将我的 rails 应用程序推送到部署,每当我这样做时,我都会抛出此错误:
Detected buildpacks: Ruby,Node.js
See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order
-----> Ruby app detected
-----> Installing bundler 2.1.4
-----> Removing BUNDLED WITH version in the Gemfile.lock
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.7.0
-----> Installing dependencies using bundler 2.1.4
Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4
/usr/bin/env: ‘jruby’: No such file or directory
Bundler Output: /usr/bin/env: ‘jruby’: No such file or directory
!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby app.
! Push failed
Jruby 似乎在某个地方玩这个,但我就是想不通。任何帮助将不胜感激。
【问题讨论】:
-
您是否将应用程序配置为使用默认的 mri ruby 或 jruby 运行?如果您使用的是 jruby,您是否按照 Heroku 文档中的所有步骤启用 jruby 支持?
-
应用程序使用默认 ruby 设置为 2.7.0。唯一提到 jruby 的实例是在 gem 文件中:
gem 'activerecord-jdbcpostgresql-adapter', platform: :jruby
标签: ruby-on-rails ruby heroku deployment