我在 Heruku 方面遇到了一些麻烦。由于以下错误,我无法推送:
Gem files will remain installed in /tmp/build_2jdec30lsc3bu/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.7 for inspection.
Results logged to /tmp/build_2jdec30lsc3bu/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.7/ext/sqlite3/gem_make.out
An error occurred while installing sqlite3 (1.3.7), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.7'` succeeds before bundling.
!
! Failed to install gems via Bundler.
!
! Detected sqlite3 gem which is not supported on Heroku.
! https://devcenter.heroku.com/articles/sqlite3
!
! Push rejected, failed to compile Ruby/Rails app
而我无法解决它。
我已经尝试过以下方法:
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg'
end
我不断收到同样的错误。我什至尝试完全删除 sqlite3。同样令人烦恼的错误。我确保在运行之前推送我的更改git push heroku master
。有任何想法吗?或者我可能会放弃 Heroku...
我以前也遇到过类似的问题。这在我的 Gemfile 中对我有用:
gem 'sqlite3', group: [:development, :test]
gem 'pg', group: [:production]
另外,在本地 git checkout 中,执行命令heroku config
。确认输出设置了以下环境变量:
RACK_ENV: production
RAILS_ENV: production
试一试。对你起作用吗?
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)