【发布时间】:2015-08-08 06:17:36
【问题描述】:
我是 Ruby on Rails 的新手。 Michael Hartl 编写的 Ruby on Rails 教程。
我使用 Cloud 9 作为主机,使用 Bitbucket 进行版本控制,并通过 Heroku 进行部署。 我尝试将 Postgresql 而不是 sqlite3 安装到我的项目中,因为我知道 Heroku 需要它。但不知何故,在我的文件中某处我失败了。
谁能帮忙?
当我跑步时:
$ git push heroku master
我收到此错误:
remote: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
remote:
remote: /tmp/build_169ab9dc473338103fb7830819856f04/vendor/ruby-2.0.0/bin/ruby extconf.rb
remote: checking for sqlite3.h... no
remote: sqlite3.h is missing. Try 'port install sqlite3 +universal',
remote: 'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
remote: and check your shared library search path (the
remote: location where your sqlite3 shared library is located).
remote: *** extconf.rb failed ***
remote: Could not create Makefile due to some reason, probably lack of necessary
remote: libraries and/or headers. Check the mkmf.log file for more details. You may
remote: need configuration options.
remote:
remote: Provided configuration options:
remote: --with-opt-dir
remote: --without-opt-dir
remote: --with-opt-include
remote: --without-opt-include=${opt-dir}/include
remote: --with-opt-lib
remote: --without-opt-lib=${opt-dir}/lib
remote: --with-make-prog
remote: --without-make-prog
remote: --srcdir=.
remote: --curdir
remote: --ruby=/tmp/build_169ab9dc473338103fb7830819856f04/vendor/ruby-2.0.0/bin/ruby
remote: --with-sqlite3-dir
remote: --without-sqlite3-dir
remote: --with-sqlite3-include
remote: --without-sqlite3-include=${sqlite3-dir}/include
remote: --with-sqlite3-lib
remote: --without-sqlite3-lib=${sqlite3-dir}/
remote:
remote:
remote: Gem files will remain installed in /tmp/build_169ab9dc473338103fb7830819856f04/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.10 for inspection.
remote: Results logged to /tmp/build_169ab9dc473338103fb7830819856f04/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.10/ext/sqlite3/gem_make.out
remote: An error occurred while installing sqlite3 (1.3.10), and Bundler cannot
remote: continue.
remote: Make sure that `gem install sqlite3 -v '1.3.10'` succeeds before bundling.
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Detected sqlite3 gem which is not supported on Heroku.
remote: ! https://devcenter.heroku.com/articles/sqlite3
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy....
remote:
remote: ! Push rejected to stormy-shelf-7526.
remote:
To https://git.heroku.com/stormy-shelf-7526.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to.....
【问题讨论】:
-
您能否发布您当前的
Gemfile,以便我可以为我的答案添加更多帮助? -
你知道我如何在这里添加我的 Gemfile 吗?瑞克,我已经遵循了那个指示。还是不行..
-
@Cathrin 使用信息编辑您的帖子
-
@Cathrin 您是否遵循文档中的所有这些步骤?您现在遇到的是哪种类型的问题?需要更多详细信息。
标签: ruby-on-rails postgresql heroku sqlite