我已尽可能多地查看现有答案,但我无法弄清楚为什么heroku仍在尝试安装sqlite3。下面是我的gemfile,我甚至没有sqlite3,因为我在开发,测试和生产中使用mysql。我错过了什么?我也没有看到任何依赖?
我在尝试推送时收到错误Detected sqlite3 gem which is not supported on Heroku
。
的Gemfile
source 'https://rubygems.org'
gem 'thin'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.1'
#mysql
gem 'mysql2'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.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'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
#tagging
gem 'acts-as-taggable-on'
#debugger
gem 'debugger'
#backup db with yaml_db
gem 'yaml_db', github: 'jetthoughts/yaml_db', ref: 'fb4b6bd7e12de3cffa93e0a298a1e5253d7e92ba'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
答案 0 :(得分:1)
如评论中所述,您可能无法重建Gemfile.lock
。执行此操作的方法是在开发系统上运行bundle install
(重建Gemfile.lock
),然后再次推送到Heroku:
$ bundle install
$ git add .
$ git commit -a -m "SQLite3"
$ git push heroku master