2015-05-26 3 views
1

Я новичок в Ruby on Rails. Выполнение руководства Ruby on Rails от Michael Hartl.сообщение об ошибке при развертывании приложения

Я использую 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..... 
+0

Можете ли вы опубликовать свой текущий 'Gemfile', чтобы я мог добавить дополнительную помощь в свой ответ? –

+0

Посмотрите на эту ссылку https://devcenter.heroku.com/articles/sqlite3 – rick

+0

Знаете ли вы, как я могу добавить сюда свой Gemfile? Рик, я следил за этой инструкцией. Все еще не работает .. – Cathrin

ответ

0

Как говорится об ошибках, вы не можете использовать sqlite3 на Heroku.

Что означает ошибка, так это то, что ваш Gemfile содержит sqlite3 как часть процесса расслоения для производства. Что вам нужно сделать, это обернуть sqlite3 в группу development и/или test и убедиться, что у вас есть жемчужина pg за пределами этих групп.

+0

Проблема в том, что я сделал это в своих файлах в Cloud 9. Я запустил установку пакета, и я пошел по учебнику с помощью heroku.com о том, как удалить sqlite3 и установить postgresql. – Cathrin

+0

Как только я увижу ваш Gemfile, я смогу дать вам немного больше информации. –

Смежные вопросы