Ruby on rails 使用sqlite3部署到Heroku时出错
我正试图将我的rails应用程序部署到Heroku,这样我就可以拥有一个临时服务器,但仍会遇到以下错误 我已经从gemfile中删除了'sqlite3'gem,并确保'pg'gem当前已安装,还将my database.yml更改为以下内容…但仍然会出现sqlite3错误。有什么建议吗Ruby on rails 使用sqlite3部署到Heroku时出错,ruby-on-rails,ruby,postgresql,heroku,sqlite,Ruby On Rails,Ruby,Postgresql,Heroku,Sqlite,我正试图将我的rails应用程序部署到Heroku,这样我就可以拥有一个临时服务器,但仍会遇到以下错误 我已经从gemfile中删除了'sqlite3'gem,并确保'pg'gem当前已安装,还将my database.yml更改为以下内容…但仍然会出现sqlite3错误。有什么建议吗 development: adapter: postgresql encoding: unicode database: app-name pool: 5 port: 5432 host: localhost
development:
adapter: postgresql
encoding: unicode
database: app-name
pool: 5
port: 5432
host: localhost
test:
adapter: postgresql
encoding: unicode
database: app-name
pool: 5
port: 5432
host: localhost
Gem::Installer::ExtensionBuildError:错误:无法生成Gem本机扩展
/tmp/build_a4c50f3d-ca0b-4757-b846-70093165281e/vendor/ruby-2.0.0/bin/ruby extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal',
'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
and check your shared library search path (the
location where your sqlite3 shared library is located).
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/tmp/build_a4c50f3d-ca0b-4757-b846-70093165281e/vendor/ruby-2.0.0/bin/ruby
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/
--enable-local
--disable-local
Gem files will remain installed in /tmp/build_a4c50f3d-ca0b-4757-b846-70093165281e/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.9 for inspection.
Results logged to /tmp/build_a4c50f3d-ca0b-4757-b846-70093165281e/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.9/ext/sqlite3/gem_make.out
Installing transitions (0.1.11)
Installing pg (0.17.0)
Installing ffi (1.9.3)
An error occurred while installing sqlite3 (1.3.9), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.9'` succeeds before bundling.
!!
! 无法通过捆绑程序安装gems。
!
! 检测到Heroku上不支持的sqlite3 gem。
!
!
!!推送被拒绝,未能编译Ruby应用程序我也收到了相同的错误消息。我通过在Sublime Text 2编辑器中编辑Activerecord/Activesupport gems解决了此问题。我用postgresql替换了sqlite3。但是必须确保已下载并安装了相应版本的postgresql。错误消息是开发人员最好的朋友。了解阅读并理解错误信息。一开始很令人沮丧,但实际上,是你最好的朋友和好老师。谢谢大家 在这里发布你的宝石文件。删除宝石锁文件,然后再次捆绑宝石。我真的收到了。我没有在更改gemfile后进行提交,这使它无法注意到更改。谢谢你的回复