我正在尝试 git push heroku master来部署我的项目,但会发生以下错误。
我正在学习一个教程,但是我已经做了多次询问并且没有成功所以我决定寻求帮助
发生以下错误
Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
Psych::SyntaxError: (<unknown>): mapping values are not allowed in this context at line 15 column 11
/tmp/build_1ff5086696451e8482f0d9358917ef79/vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/application.rb:391:in `secrets'
/tmp/build_1ff5086696451e8482f0d9358917ef79/config/initializers/uploadbox.rb:16:in `block in <top (required)>'
/tmp/build_1ff5086696451e8482f0d9358917ef79/vendor/bundle/ruby/2.0.0/gems/carrierwave-0.10.0/lib/carrierwave/uploader/configuration.rb:118:in `configure'
Tasks: TOP => environment
(See full trace by running task with --trace)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app
我的Gemfile
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 4.2.1'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails', '~> 4.0.3'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks', '~> 2.5.3'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
#gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'simple_form', '~> 3.1.0'
gem 'slim-rails', '~> 3.0.1'
gem 'start', '~> 0.1.1'
gem 'devise', '~> 3.4.1'
gem 'uploadbox', '~> 0.2.0'
gem 'bourbon', '~> 4.2.2'
gem 'neat', '~> 1.7.2'
gem 'high_voltage', '~> 2.3.0'
gem 'normalize-rails', '~> 3.0.3'
gem 'better_errors', '~> 2.1.1'
gem 'binding_of_caller', '~> 0.7.2'
group :development do
gem 'xray-rails'
gem 'pry-rails'
gem 'sqlite3', '~> 1.3.8'
end
group :production do
gem 'pg'
gem 'rails_12factor'
end
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
# Use sqlite3 as the database for Active Record
gem 'byebug'
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end
文件uploadbox.rb
Uploadbox.retina = true
Uploadbox.retina_quality = 30
Uploadbox.image_quality = 70
if Rails.env.production?
REDIS = Redis.connect(url: ENV["REDISCLOUD_URL"])
Resque.redis = REDIS
Resque.after_fork = Proc.new { ActiveRecord::Base.establish_connection }
end
CarrierWave.configure do |config|
config.storage = :fog
config.fog_credentials = {
provider: 'AWS',
aws_access_key_id: Rails.application.secrets.s3_key,
aws_secret_access_key: Rails.application.secrets.s3_secret
}
config.fog_directory = Rails.application.secrets.s3_bucket
config.fog_attributes = {'Cache-Control'=>'max-age=315576000'}
end
if Rails.env.test?
CarrierWave.configure do |config|
config.storage :file
config.enable_processing = false
end
end