通过Github推送Ruby时出现Heroku错误

f4t66c6m  于 2023-01-30  发布在  Ruby
关注(0)|答案(1)|浏览(162)

几年前,我的一个朋友给我设计了一个网站。不幸的是,从一天到下一天,这个网站不再工作了。
我的电脑上没有Ruby(我以前也没有过)。我目前正尝试通过Github(https://github.com/dtricc/zoquant)在Heroku上再次托管网站,但遇到以下错误:
See here

我的宝石文件如下所示:

source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '3.2.0'

gem 'rails', '~> 7.0.3'

gem 'pg', '>= 0.18', '< 2.0'

gem 'puma', '~> 6.0.2'

gem 'sass-rails', '~> 5.0'

gem 'uglifier', '>= 1.3.0'

gem 'webpacker'

gem 'coffee-rails', '~> 4.2'

gem 'turbolinks', '~> 5'

gem 'jbuilder', '~> 2.5'

gem 'bootsnap', '>= 1.1.0', require: false
gem 'autoprefixer-rails'
gem 'font-awesome-sass', '~> 5.6.1'
gem 'simple_form'

group :development, :test do
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end

group :development do
  gem 'web-console', '>= 3.3.0'
  gem 'listen', '>= 3.0.5', '< 3.2'
  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'
end

gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

我的宝石文件.lock如下所示:

GEM
  remote: https://rubygems.org/
  specs:
    actioncable (5.2.2)
      actionpack (= 5.2.2)
      nio4r (~> 2.0)
      websocket-driver (>= 0.6.1)
    actionmailbox (7.0.3)
      actionpack (= 7.0.3)
      activejob (= 7.0.3)
      activerecord (= 7.0.3)
      activestorage (= 7.0.3)
      activesupport (= 7.0.3)
      mail (>= 2.7.1)
      net-imap (>= 0)
      net-pop (>= 0)
      net-smtp (>= 0)
    actiontext (7.0.3)
      actionpack (= 7.0.3)
      activerecord (= 7.0.3)
      activestorage (= 7.0.3)
      activesupport (= 7.0.3)
      globalid (>= 0.6.0)
      nokogiri (>= 1.8.5)
    actionmailer (5.2.2)
      actionpack (= 5.2.2)
      actionview (= 5.2.2)
      activejob (= 5.2.2)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 2.0)
    actionpack (7.0.3)
      actionview (= 7.0.3)
      activesupport (= 7.0.3)
      rack (~> 2.0, >= 2.2.0)
      rack-test (>= 0.6.3)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.2.0)
    actionview (5.2.2)
      activesupport (= 5.2.2)
      builder (~> 3.1)
      erubi (~> 1.4)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.3)
    activejob (5.2.2)
      activesupport (= 5.2.2)
      globalid (>= 0.3.6)
    activemodel (7.0.3)
      activesupport (= 7.0.3)
    activerecord (7.0.3)
      activemodel (= 7.0.3)
      activesupport (= 7.0.3)
    activestorage (7.0.3)
      actionpack (= 7.0.3)
      activejob (= 7.0.3)
      activerecord (= 7.0.3)
      activesupport (= 7.0.3)
      marcel (~> 1.0)
      mini_mime (>= 1.1.0)
    activesupport (7.0.3)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (>= 1.6, < 2)
      minitest (>= 5.1)
      tzinfo (~> 2.0)
    arel (9.0.0)
    autoprefixer-rails (9.4.10.2)
      execjs
    bindex (0.5.0)
    bootsnap (1.4.1)
      msgpack (~> 1.0)
    builder (3.2.3)
    byebug (11.0.0)
    coffee-rails (4.2.2)
      coffee-script (>= 2.2.0)
      railties (>= 4.0.0)
    coffee-script (2.4.1)
      coffee-script-source
      execjs
    coffee-script-source (1.12.2)
    concurrent-ruby (1.1.5)
    crass (1.0.4)
    erubi (1.8.0)
    execjs (2.7.0)
    ffi (1.10.0)
    font-awesome-sass (5.6.1)
      sassc (>= 1.11)
    globalid (0.4.2)
      activesupport (>= 4.2.0)
    i18n (1.6.0)
      concurrent-ruby (~> 1.0)
    jbuilder (2.8.0)
      activesupport (>= 4.2.0)
      multi_json (>= 1.2)
    listen (3.1.5)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
      ruby_dep (~> 1.2)
    loofah (2.2.3)
      crass (~> 1.0.2)
      nokogiri (>= 1.5.9)
    mail (2.7.1)
      mini_mime (>= 0.1.1)
    marcel (1.0.2)
      mimemagic (>= 0.3.2)
    method_source (0.9.2)
    mimemagic (0.4.2)
      nokogiri (~> 1)
      rake (>= 0)
    mini_mime (1.0.1)
    mini_portile2 (2.4.0)
    minitest (5.11.3)
    msgpack (1.2.9)
    multi_json (1.13.1)
    nio4r (2.3.1)
    nokogiri (1.10.1)
      mini_portile2 (~> 2.4.0)
    pg (1.1.4)
    puma (3.12.0)
    rack (2.0.6)
    rack-proxy (0.6.5)
      rack
    rack-test (1.1.0)
      rack (>= 1.0, < 3)
    rails (7.0.3)
      actioncable (= 7.0.3)
      actionmailbox (= 7.0.3)
      actionmailer (= 7.0.3)
      actionpack (= 7.0.3)
      actiontext (= 7.0.3)
      actionview (= 7.0.3)
      activejob (= 7.0.3)
      activemodel (= 7.0.3)
      activerecord (= 7.0.3)
      activestorage (= 7.0.3)
      activesupport (= 7.0.3)
      bundler (>= 1.15.0)
      railties (= 7.0.3)
      sprockets-rails (>= 2.0.0)
    rails-dom-testing (2.0.3)
      activesupport (>= 4.2.0)
      nokogiri (>= 1.6)
    rails-html-sanitizer (1.0.4)
      loofah (~> 2.2, >= 2.2.2)
    railties (5.2.2)
      actionpack (= 5.2.2)
      activesupport (= 5.2.2)
      method_source
      rake (>= 0.8.7)
      thor (>= 0.19.0, < 2.0)
    rake (12.3.2)
    rb-fsevent (0.10.3)
    rb-inotify (0.10.0)
      ffi (~> 1.0)
    ruby_dep (1.5.0)
    sass (3.7.3)
      sass-listen (~> 4.0.0)
    sass-listen (4.0.0)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
    sass-rails (5.0.7)
      railties (>= 4.0.0, < 6)
      sass (~> 3.1)
      sprockets (>= 2.8, < 4.0)
      sprockets-rails (>= 2.0, < 4.0)
      tilt (>= 1.1, < 3)
    sassc (2.2.1)
      ffi (~> 1.9)
      rake
    simple_form (4.1.0)
      actionpack (>= 5.0)
      activemodel (>= 5.0)
    spring (2.0.2)
      activesupport (>= 4.2)
    spring-watcher-listen (2.0.1)
      listen (>= 2.7, < 4.0)
      spring (>= 1.2, < 3.0)
    sprockets (3.7.2)
      concurrent-ruby (~> 1.0)
      rack (> 1, < 3)
    sprockets-rails (3.2.1)
      actionpack (>= 4.0)
      activesupport (>= 4.0)
      sprockets (>= 3.0.0)
    thor (0.20.3)
    thread_safe (0.3.6)
    tilt (2.0.9)
    turbolinks (5.2.0)
      turbolinks-source (~> 5.2)
    turbolinks-source (5.2.0)
    tzinfo (1.2.5)
      thread_safe (~> 0.1)
    uglifier (4.1.20)
      execjs (>= 0.3.0, < 3)
    web-console (3.7.0)
      actionview (>= 5.0)
      activemodel (>= 5.0)
      bindex (>= 0.4.0)
      railties (>= 5.0)
    webpacker (4.0.2)
      activesupport (>= 4.2)
      rack-proxy (>= 0.6.1)
      railties (>= 4.2)
    websocket-driver (0.7.0)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.3)

PLATFORMS
  ruby 
  x86_64-linux

DEPENDENCIES
  autoprefixer-rails
  bootsnap (>= 1.1.0)
  byebug
  coffee-rails (~> 4.2)
  font-awesome-sass (~> 5.6.1)
  jbuilder (~> 2.5)
  listen (>= 3.0.5, < 3.2)
  pg (>= 0.18, < 2.0)
  puma (~> 3.11)
  rails (~> 5.2.2)
  sass-rails (~> 5.0)
  simple_form
  spring
  spring-watcher-listen (~> 2.0.0)
  turbolinks (~> 5)
  tzinfo-data
  uglifier (>= 1.3.0)
  web-console (>= 3.3.0)
  webpacker

RUBY VERSION
   ruby (~> 3.2.0)

我将感激任何帮助!
最佳洛伦佐
我已经更改了一些软件包的版本(我得到的错误是软件包太旧,Heroku不支持。

atmip9wb

atmip9wb1#

查看您的commit history in your GitHub account,感觉就像您试图将项目中的Ruby从2.5.3更新到3.2.0,并将Ruby on Rails版本从5.2.2更新到7.0.3,而没有进行任何代码更改。
Ruby3.0引入了一些语法上的改变,并且升级两个主要版本的RubyonRails而不改变应用程序中的任何东西,通常是不可能的。
我建议恢复这些更改并重新启动升级。但这一次,只需要按照the official Rails Guides about upgrading的建议,以小的增量步骤进行更新。
此外,每个Rails版本都支持或有首选的Ruby版本,我建议从这个answer开始遵循Ruby和Ruby on Rails的更新路径。

相关问题