错误:“heroku push rejected, failed to compile Ruby/rails app”怎么处理?

内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用

  • 回答 (2)
  • 关注 (0)
  • 查看 (26)

有以下问题,全新的RoR,第一次上传一个应用程序。

我确定'gem install sqlite3 -v 1.3.7'没问题

Failed to install gems via Bundler

Heroku push rejected, failed to compile Ruby/rails app

To git@heroku.com:peaceful-chamber-6371.git
[remote rejected] master -> master <pre-receive hook declined>
error: failed to push some refs to 'git@heroku.com:peaceful-chamber-6371.git

gem:

source 'https://rubygems.org'

gem 'rails', '3.2.12'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
group :development, :test do
gem 'sqlite3'
end
group :production do
  gem 'pg'
end


# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby

  gem 'uglifier', '>= 1.0.3'
  gem 'twitter-bootstrap-rails'
end

gem 'jquery-rails'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# Use unicorn as the app server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'debugger'
提问于
用户回答回答于

尝试这个,

删除Gemfile.lock文件然后

bundle install,然后git add,然后git commitgit push

用户回答回答于

看看Heroku写入控制台的所有输出 - 你的错误可能在某处。我碰到过这个,发现预编译步骤失败了。这也可以在本地运行:

rake assets:precompile

扫码关注云+社区