2012-01-25 13 views
12

के माध्यम से जवाहरात स्थापित करने में विफल इस तरह मेरी Gemfile दिखता है:धक्का नहीं कर सकते एप्लिकेशन Heroku - Bundler

source 'http://rubygems.org' 

gem 'rails', '3.1.2' 

#gem 'sqlite3' 
gem 'mysql2' 
gem "rvm", "~> 1.9.2" 
gem 'authlogic' 
gem "taps", "~> 0.3.23" 
gem "paperclip", "~> 2.4.5" 
gem 'aws-s3' 
gem 'actionmailer' 

gem 'will_paginate' 

group :assets do 
    gem 'sass-rails', '~> 3.1.5.rc.2' 
    gem 'coffee-rails', '~> 3.1.1' 
    gem 'uglifier', '>= 1.0.3' 
end 

group :production do 
    gem 'therubyracer-heroku', '~> 0.8.1.pre3' 
    gem 'pg' 
end 

gem 'jquery-rails' 

और इस Heroku एप्लिकेशन को आगे बढ़ाने से उत्पादन होता है:

Counting objects: 307, done. 
Delta compression using up to 2 threads. 
Compressing objects: 100% (291/291), done. 
Writing objects: 100% (307/307), 491.60 KiB | 47 KiB/s, done. 
Total 307 (delta 43), reused 0 (delta 0) 

-----> Heroku receiving push 
-----> Ruby/Rails app detected 
-----> Installing dependencies using Bundler version 1.1.rc.7 
     Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment 
     Fetching gem metadata from http://rubygems.org/....... 
     Installing rake (0.9.2.2) 
     Installing multi_json (1.0.4) 
     Installing activesupport (3.1.2) 
     Installing builder (3.0.0) 
     Installing i18n (0.6.0) 
     Installing activemodel (3.1.2) 
     Installing erubis (2.7.0) 
     Installing rack (1.3.6) 
     Installing rack-cache (1.1) 
     Installing rack-mount (0.8.3) 
     Installing rack-test (0.6.1) 
     Installing hike (1.2.1) 
     Installing tilt (1.3.3) 
     Installing sprockets (2.1.2) 
     Installing actionpack (3.1.2) 
     Installing mime-types (1.17.2) 
     Installing polyglot (0.3.3) 
     Installing treetop (1.4.10) 
     Installing mail (2.3.0) 
     Installing actionmailer (3.1.2) 
     Installing arel (2.2.1) 
     Installing tzinfo (0.3.31) 
     Installing activerecord (3.1.2) 
     Installing activeresource (3.1.2) 
     Installing authlogic (3.1.0) 
     Installing xml-simple (1.1.1) 
     Installing aws-s3 (0.6.2) 
     Installing cocaine (0.2.1) 
     Installing coffee-script-source (1.2.0) 
     Installing execjs (1.3.0) 
     Installing coffee-script (2.2.0) 
     Installing rack-ssl (1.3.2) 
     Installing json (1.6.5) with native extensions 
     Installing rdoc (3.12) 
     Installing thor (0.14.6) 
     Installing railties (3.1.2) 
     Installing coffee-rails (3.1.1) 
     Installing jquery-rails (1.0.19) 
     Installing mysql2 (0.3.11) with native extensions 
     Installing paperclip (2.4.5) 
     Installing pg (0.12.2) with native extensions 
     Using bundler (1.1.rc.7) 
     Installing rails (3.1.2) 
     Installing rest-client (1.6.7) 
     Installing rvm (1.9.2) 
     Installing sass (3.1.12) 
     Installing sass-rails (3.1.5) 
     Installing sequel (3.20.0) 
     Installing sinatra (1.0) 
     Installing sqlite3 (1.3.5) with native extensions Unfortunately, a fatal error has occurred. Please report this error to the Bundler issue tracker at https://github.com/carlhuda/bundler/issues so that we can fix it. Thanks! 
     /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) 
     /usr/local/bin/ruby extconf.rb 
     checking for sqlite3.h... no 
     sqlite3.h is missing. Try 'port install sqlite3 +universal' 
     or 'yum install sqlite-devel' 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=/usr/local/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}/lib 
     --enable-local 
     --disable-local 
     Gem files will remain installed in /tmp/build_14aejbvbx900f/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.5 for inspection. 
     Results logged to /tmp/build_14aejbvbx900f/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.5/ext/sqlite3/gem_make.out 
     from /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:486:in `block in build_extensions' 
     from /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:446:in `each' 
     from /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:446:in `build_extensions' 
     from /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:198:in `install' 
     from /tmp/build_14aejbvbx900f/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/source.rb:90:in `block in install' 
     from /tmp/build_14aejbvbx900f/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/rubygems_integration.rb:82:in `preserve_paths' 
     from /tmp/build_14aejbvbx900f/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/source.rb:89:in `install' 
     from /tmp/build_14aejbvbx900f/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/installer.rb:73:in `block in install_gem_from_spec' 
     from /tmp/build_14aejbvbx900f/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/rubygems_integration.rb:97:in `with_build_args' 
     from /tmp/build_14aejbvbx900f/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/installer.rb:72:in `install_gem_from_spec' 
     from /tmp/build_14aejbvbx900f/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/installer.rb:56:in `block in run' 
     from /tmp/build_14aejbvbx900f/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/installer.rb:55:in `run' 
     from /tmp/build_14aejbvbx900f/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/installer.rb:12:in `install' 
     from /tmp/build_14aejbvbx900f/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/cli.rb:220:in `install' 
     from /tmp/build_14aejbvbx900f/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/vendor/thor/task.rb:22:in `run' 
     from /tmp/build_14aejbvbx900f/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task' 
     from /tmp/build_14aejbvbx900f/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/vendor/thor.rb:263:in `dispatch' 
     from /tmp/build_14aejbvbx900f/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/vendor/thor/base.rb:386:in `start' 
     from /tmp/build_14aejbvbx900f/vendor/bundle/ruby/1.9.1/gems/bundler-1.1.rc.7/bin/bundle:13:in `<top (required)>' 
     from vendor/bundle/ruby/1.9.1/bin/bundle:19:in `load' 
     from vendor/bundle/ruby/1.9.1/bin/bundle:19:in `<main>' 
! 
!  Failed to install gems via Bundler. 
!  
!  Detected sqlite3 gem which is not supported on Heroku. 
!  http://devcenter.heroku.com/articles/how-do-i-use-sqlite3-for-development 
! 
!  Heroku push rejected, failed to compile Ruby/rails app 

To [email protected]:_my_repo_.git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to '[email protected]:_my_repo_.git' 

क्या गलत है? मैं अपने किसी और अनुप्रयोग में एक ही सेट अप किया है और यह ठीक काम करता है ... मैं लूंगा हर मदद, इस समस्या को पूरी दोपहर के साथ संघर्ष कर के लिए बहुत आभारी ...

संपादित करें: भी मैंने कोशिश की निकालें भंडार और बनाने के एक नया एक, लेकिन फिर भी वही।

+0

ऐसा लगता है कि यह SQLite मणि स्थापित करने का प्रयास कर रहा है।क्या आपको यकीन है कि यह जेमफाइल में टिप्पणी की गई है कि आप हरोकू को दबा रहे हैं? – mipadi

+0

मुझे बिल्कुल यकीन है। – user984621

+0

क्या आपने इसे टिप्पणी करने के बाद अपनी Gemfile.lock फ़ाइल को फिर से बनाया था? – mipadi

उत्तर

9

तो, Heroku suporters साथ एक छोटी सी बात के बाद, "समस्या" taps मणि में था - sqlite3 इसे करने के लिए एक संघ है। काम कर समाधान है:

group :development do 
    gem 'taps' 
    gem 'rvm' 
end 
+0

मेरे लिए काम किया - बहुत बहुत धन्यवाद! – eckza

+0

खुशी है कि यह आपकी मदद की :) – user984621

1

आपको अपने प्रोजेक्ट फ़ोल्डर में कमांड लाइन पर bundle करने की आवश्यकता है।

यह आपकी Gemfile.lock फ़ाइल को अपडेट करेगा - आपको यह और Gemfile दोनों को करने की आवश्यकता है और फिर Heroku को फिर से दबाएं।

+0

मैंने इसे पहले से ही कोशिश की और अभी भी वही त्रुटि। मैंने 'बंडल',' बंडल इंस्टॉल ',' बंडल अपडेट' 'की कोशिश की, लेकिन फिर भी वही त्रुटि जब मैं ऐप को हेरोकू – user984621

+0

पर तैनात करने का प्रयास करता हूं, यह सुनिश्चित करने के लिए कि आपके पास ऐसी फाइलें नहीं हैं जो आपके पास गिट स्टेटस के आउटपुट को दोबारा जांचें हेरोोकू को धक्का देने से पहले गिट करने के लिए जोड़ा और प्रतिबद्ध नहीं किया है। –

+0

जब मैं 'गिट स्टेटस' टाइप करता हूं, तो परिणाम है # # शाखा मास्टर पर प्रतिबद्ध करने के लिए कुछ भी नहीं (काम करने वाली निर्देशिका साफ़ करें) '- – user984621

2

क्या आपने काम करने की प्रतिलिपि बनाने के लिए Gemfile जोड़ा है और इसे अपने स्थानीय भंडार में प्रतिबद्ध किया है? शायद आप Gemfile और Gemfile.lock के पुराने संस्करण को दबा रहे हैं?

+0

से पढ़ने के लिए कुछ भी नहीं, मैंने अब' Gemfile.lock' को हटाने की कोशिश की, 'बंडल इंस्टॉल करें ', Gemfile.lock बनाया गया था और जब मैंने ऐपोकू को ऐप को धक्का देने की कोशिश की, तो फिर भी वही त्रुटि ... – user984621

+1

क्या आपने "गिट एड जेमफाइल" और "गिट प्रतिबद्ध" निष्पादित किया है? –

+0

हां, 'गिट जोड़ें जेमफाइल' -> 'गिट प्रतिबद्ध' -> # # शाखा मास्टर पर प्रतिबद्ध करने के लिए कुछ भी नहीं (काम करने वाली निर्देशिका साफ) ' – user984621

27

बस Gemfile में पाठ/विकास समूह के तहत अपने sqlite3 शब्दों में कहें, यह भी उत्पादन gemfile समूह में thin और pg जोड़ने:

  1. संपादित Gemfile निम्नलिखित की तरह:

    gem 'sqlite3', :group => [:development, :test] 
    group :production do 
        gem 'thin' 
        gem 'pg' 
    end 
    
  2. Gemfile.lock

    को दूर
  3. रन bundle install --without production
  4. git add .
  5. git commit -am "bundle updating sqlite3"
  6. git push heroku +master
+0

मैंने अब आपके द्वारा लिखे गए दोनों प्रकारों की कोशिश की ... और फिर भी वही। – user984621

+0

आपने कैसे बंडल किया? अद्यतन देखें ... –

+2

Gemfile.lock को हटाकर यहां कुंजी है। यह मेरे लिए काम किया। – Edwin

2

Gemfile में अगले के साथ 'मणि sqlite3' की जगह ले:

group :development do 
gem 'sqlite3' 
end 
gem 'pg' 
5

आप Gemfile बदलते हैं तो

git add . 
git commint -m"ufff" 

तो

git push heroku master 
मत भूलना
0

मेरे पास थोड़ा अद्वितीय स्थिति थी मणि 'mailcatcher' के साथ आयन।

मेरे पास सभी वातावरण के लिए मणि स्थापित किया गया था, लेकिन मुझे एहसास हुआ कि इसकी निर्भरताओं में से एक sqlite3 है। मैंने मेलकैचर मणि को विकास समूह में ले जाया और यह मेरी समस्या तय कर दी।

संबंधित मुद्दे