lavezzi1
@lavezzi1

Не получается задеплоить в heroku, в чем дело?

Следую данному туториалу railstutorial.ru/chapters/4_0/beginning#sec-deploying . Но ничего не выходит. Я уже все перепробовал, что нашел на stackoverflow и т.д. Удалял и переустанавливал sqlite3. И следовал туториал по ссылке sqlite not supported heroku. Ноль!

Прошу вашей помощи.

Мой гемфайл
source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.3.8'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
group :production do
gem 'pg'
end
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'

# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'

# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end


roman@Salomon:~/ruby/app$ git push heroku master
Counting objects: 72, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (61/61), done.
Writing objects: 100% (72/72), 17.01 KiB | 0 bytes/s, done.
Total 72 (delta 8), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.0.0
remote: -----> Installing dependencies using 1.7.12
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Fetching gem metadata from https://rubygems.org/.........
remote: Installing rake 10.4.2
remote: Installing i18n 0.7.0
remote: Installing minitest 5.6.0
remote: Installing thread_safe 0.3.5
remote: Installing builder 3.2.2
remote: Installing erubis 2.7.0
remote: Installing mini_portile 0.6.2
remote: Installing mime-types 2.5
remote: Installing rack 1.6.0
remote: Installing arel 6.0.0
remote: Installing coffee-script-source 1.9.1.1
remote: Installing json 1.8.2
remote: Installing execjs 2.5.2
remote: Installing thor 0.19.1
remote: Using bundler 1.7.12
remote: Installing multi_json 1.11.0
remote: Installing tilt 1.4.1
remote: Installing sass 3.4.13
remote: Installing tzinfo 1.2.2
remote: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
remote: /tmp/build_c0397a0992f00a86c5d14f510f5337c8/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: 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_c0397a0992f00a86c5d14f510f5337c8/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: Gem files will remain installed in /tmp/build_c0397a0992f00a86c5d14f510f5337c8/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.10 for inspection.
remote: Results logged to /tmp/build_c0397a0992f00a86c5d14f510f5337c8/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.10/ext/sqlite3/gem_make.out
remote: Installing nokogiri 1.6.6.2
remote: Installing pg 0.18.1
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: Bundler Output: Fetching gem metadata from https://rubygems.org/.........
remote: Installing rake 10.4.2
remote: Installing i18n 0.7.0
remote: Installing minitest 5.6.0
remote: Installing thread_safe 0.3.5
remote: Installing builder 3.2.2
remote: Installing erubis 2.7.0
remote: Installing mini_portile 0.6.2
remote: Installing mime-types 2.5
remote: Installing rack 1.6.0
remote: Installing arel 6.0.0
remote: Installing coffee-script-source 1.9.1.1
remote: Installing json 1.8.2
remote: Installing execjs 2.5.2
remote: Installing thor 0.19.1
remote: Using bundler 1.7.12
remote: Installing multi_json 1.11.0
remote: Installing tilt 1.4.1
remote: Installing sass 3.4.13
remote: Installing tzinfo 1.2.2
remote:
remote: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
remote:
remote: /tmp/build_c0397a0992f00a86c5d14f510f5337c8/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_c0397a0992f00a86c5d14f510f5337c8/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_c0397a0992f00a86c5d14f510f5337c8/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.10 for inspection.
remote: Results logged to /tmp/build_c0397a0992f00a86c5d14f510f5337c8/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.10/ext/sqlite3/gem_make.out
remote: Installing nokogiri 1.6.6.2
remote: Installing pg 0.18.1
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 vast-savannah-2720.
remote:
To https://git.heroku.com/vast-savannah-2720.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/vast-savannah-2720.git'
  • Вопрос задан
  • 1524 просмотра
Решения вопроса 2
@Yarik23
Лучше обучайся по свежей книжке https://www.railstutorial.org/book

source 'https://rubygems.org'

gem 'rails', '4.2.1'
gem 'sass', '3.4.13'
gem 'sass-rails', '5.0.3'
gem 'uglifier', '2.7.1'
gem 'coffee-rails', '4.1.0'
gem 'jquery-rails', '4.0.3'
gem 'turbolinks', '2.5.3'
gem 'jbuilder', '2.2.13'
gem 'sdoc', '0.4.1', group: :doc

group :development, :test do
  gem 'sqlite3', '1.3.10'
  gem 'byebug', '4.0.5'
  gem 'web-console', '2.1.2'
  gem 'spring', '1.3.4'
end

group :production do
  gem 'pg',             '0.17.1'
  gem 'rails_12factor', '0.0.2'
end
Ответ написан
viktorvsk
@viktorvsk
Как же вы следовали туториалу с хероку?
Там же четко написано, что нужно:
replace gem 'sqlite3' with gem 'pg'

Если так сильно хотите разрабатывать на sqlite (что не рекомендуемо), то так и пишите
group :development do
  gem 'sqlite3'
end
Ответ написан
Пригласить эксперта
Ответы на вопрос 1
@Renius
дурак восторженный
> remote: ! Detected sqlite3 gem which is not supported on Heroku.
> remote: ! https://devcenter.heroku.com/articles/sqlite3

Первое что нужно сделать, это научиться читать то что пишет деплоер, а не постить вопросы в тостер.
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы