2015-11-17 3 views
1

Я пытаюсь подтолкнуть свое новое приложение рельсов к Heroku, но это не сработает. Я пробовал много вещей, таких как:git push heroku master rails error

  1. Удалить Gemfile.lock и создать еще один
  2. Выполнить пакет установки и перевяжите установки --without производство на
  3. Переустановка жемчужин «пг» и «rails_12factor»

Вот что появляется в командной строке, когда я типа GIT мастер толчок Heroku:

Counting objects: 87, done. 
Delta compression using up to 8 threads. 
Compressing objects: 100% (73/73), done. 
Writing objects: 100% (87/87), 18.46 KiB | 0 bytes/s, done. 
Total 87 (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 bundler 1.9.7 
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:  Fetching version metadata from https://rubygems.org/... 
remote:  Fetching dependency metadata from https://rubygems.org/.. 
remote:  Rubygems 2.0.14 is not threadsafe, so your gems must be installed one at a time. Upgrade to Rubygems 2.1.0 or higher to enable parallel gem installation. 
remote:  Installing rake 10.4.2 
remote:  Installing i18n 0.7.0 
remote:  Installing json 1.8.3 
remote:  Installing minitest 5.8.2 
remote:  Installing thread_safe 0.3.5 
remote:  Installing tzinfo 1.2.2 
remote:  Installing activesupport 4.2.4 
remote:  Installing builder 3.2.2 
remote:  Installing erubis 2.7.0 
remote:  Installing mini_portile 0.6.2 
remote:  Installing nokogiri 1.6.6.2 
remote:  Installing rails-deprecated_sanitizer 1.0.3 
remote:  Installing rails-dom-testing 1.0.7 
remote:  Installing loofah 2.0.3 
remote:  Installing rails-html-sanitizer 1.0.2 
remote:  Installing actionview 4.2.4 
remote:  Installing rack 1.6.4 
remote:  Installing rack-test 0.6.3 
remote:  Installing actionpack 4.2.4 
remote:  Installing globalid 0.3.6 
remote:  Installing activejob 4.2.4 
remote:  Installing mime-types 2.6.2 
remote:  Installing mail 2.6.3 
remote:  Installing actionmailer 4.2.4 
remote:  Installing activemodel 4.2.4 
remote:  Installing arel 6.0.3 
remote:  Installing activerecord 4.2.4 
remote:  Installing coffee-script-source 1.9.1.1 
remote:  Installing execjs 2.6.0 
remote:  Installing coffee-script 2.4.1 
remote:  Installing thor 0.19.1 
remote:  Installing railties 4.2.4 
remote:  Installing coffee-rails 4.1.0 
remote:  Installing multi_json 1.11.2 
remote:  Installing jbuilder 2.3.2 
remote:  Installing jquery-rails 4.0.5 
remote:  Using bundler 1.9.7 
remote:  Installing sprockets 3.4.0 
remote:  Installing sprockets-rails 2.3.3 
remote:  Installing rails 4.2.4 
remote:  Installing rdoc 4.2.0 
remote:  Installing sass 3.4.19 
remote:  Installing tilt 2.0.1 
remote:  Installing sass-rails 5.0.4 
remote:  Installing sdoc 0.4.1 
remote:  Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 
remote:  /tmp/build_0e499d4b3416be94496280d6a0cdf1f8/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_0e499d4b3416be94496280d6a0cdf1f8/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_0e499d4b3416be94496280d6a0cdf1f8/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.11 for inspection. 
remote:  Results logged to /tmp/build_0e499d4b3416be94496280d6a0cdf1f8/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.11/ext/sqlite3/gem_make.out 
remote:  An error occurred while installing sqlite3 (1.3.11), and Bundler cannot 
remote:  continue. 
remote:  Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling. 
remote:  Bundler Output: Fetching gem metadata from https://rubygems.org/........... 
remote:  Fetching version metadata from https://rubygems.org/... 
remote:  Fetching dependency metadata from https://rubygems.org/.. 
remote:  Rubygems 2.0.14 is not threadsafe, so your gems must be installed one at a time. Upgrade to Rubygems 2.1.0 or higher to enable parallel gem installation. 
remote:  Installing rake 10.4.2 
remote:  Installing i18n 0.7.0 
remote:  Installing json 1.8.3 
remote:  Installing minitest 5.8.2 
remote:  Installing thread_safe 0.3.5 
remote:  Installing tzinfo 1.2.2 
remote:  Installing activesupport 4.2.4 
remote:  Installing builder 3.2.2 
remote:  Installing erubis 2.7.0 
remote:  Installing mini_portile 0.6.2 
remote:  Installing nokogiri 1.6.6.2 
remote:  Installing rails-deprecated_sanitizer 1.0.3 
remote:  Installing rails-dom-testing 1.0.7 
remote:  Installing loofah 2.0.3 
remote:  Installing rails-html-sanitizer 1.0.2 
remote:  Installing actionview 4.2.4 
remote:  Installing rack 1.6.4 
remote:  Installing rack-test 0.6.3 
remote:  Installing actionpack 4.2.4 
remote:  Installing globalid 0.3.6 
remote:  Installing activejob 4.2.4 
remote:  Installing mime-types 2.6.2 
remote:  Installing mail 2.6.3 
remote:  Installing actionmailer 4.2.4 
remote:  Installing activemodel 4.2.4 
remote:  Installing arel 6.0.3 
remote:  Installing activerecord 4.2.4 
remote:  Installing coffee-script-source 1.9.1.1 
remote:  Installing execjs 2.6.0 
remote:  Installing coffee-script 2.4.1 
remote:  Installing thor 0.19.1 
remote:  Installing railties 4.2.4 
remote:  Installing coffee-rails 4.1.0 
remote:  Installing multi_json 1.11.2 
remote:  Installing jbuilder 2.3.2 
remote:  Installing jquery-rails 4.0.5 
remote:  Using bundler 1.9.7 
remote:  Installing sprockets 3.4.0 
remote:  Installing sprockets-rails 2.3.3 
remote:  Installing rails 4.2.4 
remote:  Installing rdoc 4.2.0 
remote:  Installing sass 3.4.19 
remote:  Installing tilt 2.0.1 
remote:  Installing sass-rails 5.0.4 
remote:  Installing sdoc 0.4.1 
remote:   
remote:  Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 
remote:   
remote:  /tmp/build_0e499d4b3416be94496280d6a0cdf1f8/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_0e499d4b3416be94496280d6a0cdf1f8/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_0e499d4b3416be94496280d6a0cdf1f8/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.11 for inspection. 
remote:  Results logged to /tmp/build_0e499d4b3416be94496280d6a0cdf1f8/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.11/ext/sqlite3/gem_make.out 
remote:  An error occurred while installing sqlite3 (1.3.11), and Bundler cannot 
remote:  continue. 
remote:  Make sure that `gem install sqlite3 -v '1.3.11'` 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 salty-oasis-5413. 
remote: 
To https://git.heroku.com/salty-oasis-5413.git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to 'https://git.heroku.com/salty-oasis-5413.git' 

I s aw в некоторых руководствах, что при первом запуске этой команды герой просит вас ввести пароль, но в моем случае это не так.

Мой драгоценный камень файл

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 
gem 'rails', '4.2.4' 
# Use sqlite3 as the database for Active Record 
gem 'pg', '~> 0.18.4' 
gem 'rails_12factor', '~>0.0.3' 

# 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/rails/execjs#readme for more supported runtimes 
# gem 'therubyracer', platforms: :ruby 
gem 'byebug', '~>6.0.2' 
gem 'web-console', '~> 2.0' 
gem 'spring', '~>1.4.0' 
# 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 
gem 'bootstrap-sass', '~> 3.3', '>= 3.3.5.1' 
# 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 'sqlite3', '1.3.11' 

end 

group :production do 
    gem 'pg', '~> 0.18.4' 
    gem 'rails_12factor', '~>0.0.3' 
end 
    # Access an IRB console on exception pages or by using <%= console %> in views 


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

Спасибо, ребята.

+0

это выглядит серьезно: удаленный: Gem :: Installer :: ExtensionBuildError: ERROR: Не удалось создать самородное расширение gem. удаленный: /tmp/build_0e499d4b3416be94496280d6a0cdf1f8/vendor/ruby-2.0.0/bin/ruby extconf.rb удаленный: проверка на sqlite3.h ... нет удаленный: sqlite3.h отсутствует. Попробуйте «установить порт sqlite3 + universal», удаленный: «yum install sqlite-devel» или «apt-get install libsqlite3-dev» удаленный: и проверьте путь поиска разделяемой библиотеки (пульт : местоположение, где ваша общая библиотека sqlite3 расположен). пульт дистанционного управления: *** extconf.rb не удалось *** – davejagoda

ответ

0

Проблема заключается в том, что установка sqllite не установлена ​​для завершения установки. Так что установите sqllite3 как одну из ваших зависимостей и установите его

+0

Я установил камень sqlite3. У меня есть этот пакет, установленный на моем компьютере – Sara

+0

heroku - это кто-то сервер, и по вышеуказанной команде вы нажимаете свой код на другой сервер. Сервер heroku также должен иметь также sqllite. поэтому добавьте sqlite3 в файл управления зависимостями ruby. – Pradheep

+0

Добавьте sqlite-devel в свой файл gem, как указано в этом https://devcenter.heroku.com/articles/getting-started-with-ruby#declare-app-dependencies – Pradheep

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