У меня есть "маленькая проблема".Пытаюсь изучить Ruby On Rails, и теперь я хочу развернуть свой проект на heroku.
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.5.3
-----> Installing dependencies using bundler 1.15.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.6). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
Fetching gem metadata from https://rubygems.org/.............
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Fetching rake 12.3.2
Fetching concurrent-ruby 1.1.5
Fetching json 1.8.6
Installing rake 12.3.2
Installing json 1.8.6 with native extensions
Installing concurrent-ruby 1.1.5
Fetching minitest 5.11.3
Installing minitest 5.11.3
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching builder 3.2.3
Installing builder 3.2.3
Fetching erubis 2.7.0
Installing erubis 2.7.0
Fetching mini_portile2 2.4.0
Installing mini_portile2 2.4.0
Fetching crass 1.0.4
Installing crass 1.0.4
Fetching rack 1.6.11
Installing rack 1.6.11
Fetching mini_mime 1.0.1
Installing mini_mime 1.0.1
Fetching arel 6.0.4
Using bundler 1.15.2
Fetching coffee-script-source 1.12.2
Installing arel 6.0.4
Installing coffee-script-source 1.12.2
Fetching execjs 2.7.0
Installing execjs 2.7.0
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching ffi 1.10.0
Fetching multi_json 1.13.1
Installing multi_json 1.13.1
Installing ffi 1.10.0 with native extensions
Fetching pg 0.17.1
Installing pg 0.17.1 with native extensions
Fetching rails_serve_static_assets 0.0.5
Installing rails_serve_static_assets 0.0.5
Fetching rails_stdout_logging 0.0.5
Installing rails_stdout_logging 0.0.5
Fetching rb-fsevent 0.10.3
Installing rb-fsevent 0.10.3
Fetching rdoc 4.3.0
Installing rdoc 4.3.0
Fetching tilt 1.4.1
Installing tilt 1.4.1
Fetching i18n 0.9.5
Installing i18n 0.9.5
Fetching tzinfo 1.2.5
Installing tzinfo 1.2.5
Fetching nokogiri 1.9.1
Installing nokogiri 1.9.1 with native extensions
Fetching rack-test 0.6.3
Installing rack-test 0.6.3
Fetching sprockets 3.7.2
Installing sprockets 3.7.2
Fetching mail 2.7.1
Installing mail 2.7.1
Fetching coffee-script 2.4.1
Installing coffee-script 2.4.1
Fetching rails_12factor 0.0.2
Installing rails_12factor 0.0.2
Fetching rb-inotify 0.9.10
Installing rb-inotify 0.9.10
Fetching activesupport 4.2.0
Installing activesupport 4.2.0
Fetching sdoc 0.4.0
Installing sdoc 0.4.0
Fetching uglifier 2.5.3
Installing uglifier 2.5.3
Fetching sass-listen 4.0.0
Installing sass-listen 4.0.0
Fetching rails-deprecated_sanitizer 1.0.3
Fetching globalid 0.4.2
Installing globalid 0.4.2
Installing rails-deprecated_sanitizer 1.0.3
Fetching activemodel 4.2.0
Fetching jbuilder 2.2.3
Installing activemodel 4.2.0
Installing jbuilder 2.2.3
Fetching sass 3.7.3
Fetching activejob 4.2.0
Installing activejob 4.2.0
Installing sass 3.7.3
Fetching activerecord 4.2.0
Installing activerecord 4.2.0
Fetching rails-dom-testing 1.0.9
Fetching loofah 2.2.3
Installing rails-dom-testing 1.0.9
Installing loofah 2.2.3
Fetching rails-html-sanitizer 1.0.4
Installing rails-html-sanitizer 1.0.4
Fetching actionview 4.2.0
Installing actionview 4.2.0
Fetching actionpack 4.2.0
Installing actionpack 4.2.0
Fetching railties 4.2.0
Fetching actionmailer 4.2.0
Fetching sprockets-rails 3.2.1
Installing sprockets-rails 3.2.1
Installing railties 4.2.0
Installing actionmailer 4.2.0
Fetching jquery-rails 4.0.3
Fetching rails 4.2.0
Fetching coffee-rails 4.1.0
Installing coffee-rails 4.1.0
Installing jquery-rails 4.0.3
Installing rails 4.2.0
Fetching sass-rails 5.0.3
Installing sass-rails 5.0.3
Fetching turbolinks 2.3.0
Installing turbolinks 2.3.0
Bundle complete! 17 Gemfile dependencies, 57 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into ./vendor/bundle.
Post-install message from sass:
Ruby Sass is deprecated and will be unmaintained as of 26 March 2019.
* If you use Sass as a command-line tool, we recommend using Dart Sass, the new
primary implementation: https://sass-lang.com/install
* If you use Sass as a plug-in for a Ruby web framework, we recommend using the
sassc gem: https://github.com/sass/sassc-ruby#readme
* For more details, please refer to the Sass blog:
http://sass.logdown.com/posts/7081811
Bundle completed (39.08s)
Cleaning up the bundler cache.
-----> Installing node-v10.14.1-linux-x64
-----> Detecting rake tasks
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
/tmp/build_af4ee1266f205da440cd39f395d56ff3/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.0/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Fixnum is deprecated
/tmp/build_af4ee1266f205da440cd39f395d56ff3/vendor/bundle/ruby/2.5.0/gems/activesupport-4.2.0/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Bignum is deprecated
rake aborted!
SystemStackError: stack level too deep
После этого у меня так много ошибок, а после них:
Tasks: TOP => environment
(See full trace by running task with --trace)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app.
! Push failed
Я пытался1.Добавить файл «config.assets.initialize_on_precompile = false» в мой файл application.rb.
2.Initialize RAILS_ENV = Активы rake рабочего комплекта: предварительная компиляция
3. Удалить приложение.CSS (на самом деле, этот файл CSS пуст)
Но я все еще не могу развернуть.
Может быть, это может помочь вам:
Gemfile:
source 'https://rubygems.org'
gem 'rails', '4.2.0'
gem 'uglifier', '2.5.3'
gem 'coffee-rails', '4.1.0'
gem 'jquery-rails', '4.0.3'
gem 'turbolinks', '2.3.0'
gem 'jbuilder', '2.2.3'
gem 'sdoc', '0.4.0', group: :doc
group :development, :test do
gem 'sqlite3', '1.3.9'
gem 'byebug', '3.4.0'
gem 'web-console', '2.0.0.beta3'
gem 'spring', '1.1.3'
end
group :test do
gem 'minitest-reporters', '1.0.5'
gem 'mini_backtrace', '0.1.3'
gem 'guard-minitest', '2.3.1'
end
group :production do
gem 'pg', '0.17.1'
gem 'rails_12factor', '0.0.2'
end
Файл Database.yml (возможно, проблема здесь, idk):
# PostgreSQL. Versions 8.2 and up are supported.
#
# Install the pg driver:
# gem install pg
# On Mac OS X with macports:
# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
# On Windows:
# gem install pg
# Choose the win32 build.
# Install PostgreSQL and put its /bin directory on your path.
#
# Configure Using Gemfile
# gem 'pg'
#
development:
adapter: postgresql
encoding: unicode
database: sample_postgres_development
pool: 5
username: sample_postgres
password:
# Connect on a TCP socket. Omitted by default since the client uses a
# domain socket that doesn't need configuration. Windows does not have
# domain sockets, so uncomment these lines.
#host: localhost
#port: 5432
# Schema search path. The server defaults to $user,public
#schema_search_path: myapp,sharedapp,public
# Minimum log levels, in increasing order:
# debug5, debug4, debug3, debug2, debug1,
# log, notice, warning, error, fatal, and panic
# The server defaults to notice.
#min_messages: warning
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: postgresql
encoding: unicode
database: sample_postgres_test
pool: 5
username: sample_postgres
password:
production:
adapter: postgresql
encoding: unicode
database: sample_postgres_production
pool: 5
username: sample_postgres
password:
Файл Application.js (фактически пустой):
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .