Я хочу отправить sh свой проект в Heroku, но когда я git push heroku master
, появляется эта ошибка:
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to enigmatic-stream-22983.
remote:
To https://git.heroku.com/enigmatic-stream-22983.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/enigmatic-stream-22983.git'
Мой gemfile:
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.6.5'
gem 'rails', '~> 6.0.2', '>= 6.0.2.1'
gem 'bootstrap-sass', '~> 3.4.1'
gem 'jquery-rails', '~> 4.3', '>= 4.3.5'
gem 'puma', '~> 4.1'
gem 'sass-rails', '>= 6'
gem 'webpacker', '~> 4.0'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.7'
gem 'bootsnap', '>= 1.4.2', require: false
group :development, :test do
gem 'sqlite3', '~> 1.4'
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
gem 'web-console', '>= 3.3.0'
end
group :test do
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
gem 'webdrivers'
end
group :production do
gem 'pg'
gem 'mini_racer'
end
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
package.json
:
{
"name": "myrecipes",
"private": true,
"dependencies": {
"@rails/actioncable": "^6.0.0",
"@rails/activestorage": "^6.0.0",
"@rails/ujs": "^6.0.0",
"@rails/webpacker": "4.2.2",
"bootstrap": "^4.4.1",
"expose-loader": "^0.7.5",
"jquery": "^3.4.1",
"popper.js": "^1.16.1",
"turbolinks": "^5.2.0"
},
"version": "0.1.0",
"devDependencies": {
"webpack-dev-server": "^3.10.3"
}
}
application.rb
:
require_relative 'boot'
require 'rails/all'
config.assets.initialize_on_precompile = false
module Myrecipes
class Application < Rails::Application
config.load_defaults 6.0
config.assets.initialize_on_precompile = false
end
end
config/webpack/production.js
:
process.env.NODE_ENV = process.env.NODE_ENV || 'production'
const environment = require('./environment')
module.exports = environment.toWebpackConfig()