无法通过Bundler安装gem。远程:!远程:!推送被拒绝,无法编译Ruby应用。远程:远程:!推送失败

时间:2019-02-27 00:25:48

标签: ruby-on-rails heroku

我在堆栈溢出时尝试了所有解决方案,但对我没有任何帮助。

这是我的问题

Heroku日志-t

 ID 3d636cae-b623-44f8-8aee-7eb12dfcccc0
    -----> Ruby app detected
    -----> Compiling Ruby/Rails
    -----> Using Ruby version: ruby-2.0.0
    -----> Installing dependencies using bundler 1.15.2
           Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
           Fetching gem metadata from https://rubygems.org/........
           Fetching version metadata from https://rubygems.org/..
           Fetching dependency metadata from https://rubygems.org/.
           devise-4.6.1 requires ruby version >= 2.1.0, which is incompatible with the
           current version, ruby 2.0.0p648
           Bundler Output: Fetching gem metadata from https://rubygems.org/........
           Fetching version metadata from https://rubygems.org/..
           Fetching dependency metadata from https://rubygems.org/.
           devise-4.6.1 requires ruby version >= 2.1.0, which is incompatible with the
           current version, ruby 2.0.0p648
     !
     !     Failed to install gems via Bundler.
     !
     !     Push rejected, failed to compile Ruby app.
     !     Push failed

1 个答案:

答案 0 :(得分:0)

devise-4.6.1 requires ruby version >= 2.1.0, which is incompatible with the
           current version, ruby 2.0.0p648

这很清楚。 您可能应该将本地计算机上的ruby环境至少更新为2.1.0,并同时更新gemfile

https://rubygems.org/gems/devise/versions/3.5.10

降级为gem 'devise', '~> 3.5', '>= 3.5.10',因为它是2.0版下使用ruby的最后一个设计。

我会选择第一个选项。