简体   繁体   English

git push heroku master问题

[英]git push heroku master issue

I am having a problem with my application not being uploaded to heroku. 我的应用程序无法上传到heroku时遇到问题。 When I typed in: git push heroku master 当我输入时:git push heroku master

I get an error at the end: 最后我得到一个错误:

**Results logged to /tmp/build_2akv91a7tpdfl/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.7/ext/sqlite3/gem_make.out An error occurred while installing sqlite3 (1.3.7), and Bundler cannot continue. **结果记录到/tmp/build_2akv91a7tpdfl/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.7/ext/sqlite3/gem_make.out安装sqlite3(1.3.7)时发生错误,Bundler无法继续。 Make sure that gem install sqlite3 -v '1.3.7' succeeds before bundling. 捆绑之前,请确保gem install sqlite3 -v '1.3.7'成功。 ! ! Failed to install gems via Bundler. 无法通过Bundler安装gem。 ! ! Push rejected, failed to compile Ruby/Rails app** 推送被拒绝,无法编译Ruby / Rails应用**

When i tried installing the gems its asking for, and redid the process the same error message comes up even after i installed 'gem install sqlite3 -v '1.3.7.'' 当我尝试安装gems并要求重新进行安装时,即使在我安装了'gem install sqlite3 -v'1.3.7之后,也会出现相同的错误消息。''

(For those who are following Michael Hartl rails tutorials i followed it by detail but I'm still getting an error message.) (对于那些遵循Michael Hartl rails教程的人,我详细介绍了它,但仍然收到错误消息。)

Any help will be greatly appreciated. 任何帮助将不胜感激。 I am new to rails so if you have a solution, please do speak in layman's terms. 我是Rails的新手,因此,如果您有解决方案,请以通俗易懂的方式讲。

I don't think you can use sqlite3 on Heroku. 我认为您不能在Heroku上使用sqlite3。 You can use postgres instead. 您可以改用postgres。

Remove sqlite3 gem and add pg gem in your Gemfile. 删除sqlite3 gem并将pg gem添加到您的Gemfile中。

gem 'pg'

Since Heroku provides you a PostgreSQL database for your app, edit your Gemfile and change this line: 由于Heroku为您的应用程序提供了PostgreSQL数据库,因此请编辑Gemfile并更改以下行:

gem 'sqlite3' To this: gem'sqlite3'为此:

gem 'pg' 宝石'pg'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM