2016-06-10 59 views
0

真的停留在步驟2.5:部署(推送)到heroku - (http://installfest.railsbridge.org/installfest/deploy_a_rails_app)。我按要求完成了。但預期結果不符。即使我嘗試過類似帖子的所有解決方案,問題仍然存在。我已經將SQLite改爲「pg」。安裝postgresq1。然而無濟於事。可以檢測到我無法在文件中找到的SQLite寶石。請原諒,我在這個階段缺乏瞭解。Installfest | Railsbridge |部署Rails應用程序| heroku推送已拒絕|無法通過Bundler安裝Gem

C:\Sites\test_app>git commit -m "Updates for heroku deployment" 
On branch master 
nothing to commit, working directory clean 

C:\Sites\test_app>git push heroku master 
Counting objects: 96, done. 
Delta compression using up to 2 threads. 
Compressing objects: 100% (88/88), done. 
Writing objects: 100% (96/96), 21.53 KiB | 0 bytes/s, done. 
Total 96 (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.2.4 
remote: ###### WARNING: 
remote:  Removing `Gemfile.lock` because it was generated on Windows. 
remote:  Bundler will do a full resolve so native gems are handled properly. 
remote:  This may result in unexpected gem versions being used in your app. 
remote:  In rare occasions Bundler may not be able to resolve your dependencies at all. 
remote:  https://devcenter.heroku.com/articles/bundler-windows-gemfile 
remote: 
remote: -----> Installing dependencies using bundler 1.11.2 
remote:  Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 
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:  Resolving dependencies.... 
remote:  Installing json 1.8.3 with native extensions 
remote:  Installing i18n 0.7.0 
remote:  Installing rake 11.1.2 
remote:  Installing thread_safe 0.3.5 
remote:  Installing minitest 5.9.0 
remote:  Installing erubis 2.7.0 
remote:  Installing builder 3.2.2 
remote:  Installing mini_portile2 2.1.0 
remote:  Installing pkg-config 1.1.7 
remote:  Installing rack 1.6.4 
remote:  Installing mime-types-data 3.2016.0521 
remote:  Using bundler 1.11.2 
remote:  Installing arel 6.0.3 
remote:  Installing execjs 2.7.0 
remote:  Installing coffee-script-source 1.10.0 
remote:  Installing thor 0.19.1 
remote:  Installing concurrent-ruby 1.0.2 
remote:  Installing multi_json 1.12.1 
remote:  Installing sass 3.4.22 
remote:  Installing sqlite3 1.3.11 with native extensions 
remote:  Installing tilt 2.0.5 
remote:  Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 
remote:  /tmp/build_6045ed930dd6a5b85911b00009c2001c/vendor/ruby-2.2.4/bin/ruby -r ./siteconf20160610-323-o54ilu.rb 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_6045ed930dd6a5b85911b00009c2001c/vendor/ruby-2.2.4/bin/$(RUBY_BASE_NAME) 
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}/lib 
remote:  extconf failed, exit code 1 
remote:  Gem files will remain installed in /tmp/build_6045ed930dd6a5b85911b00009c2001c/vendor/bundle/ruby/2.2.0/gems/sqlite3-1.3.11 for inspection. 
remote:  Results logged to /tmp/build_6045ed930dd6a5b85911b00009c2001c/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0-static/sqlite3-1.3.11/gem_make.out 
remote:  Installing tzinfo 1.2.2 
remote:  Installing rdoc 4.2.2 
remote:  Installing rack-test 0.6.3 
remote:  Installing mime-types 3.1 
remote:  Installing nokogiri 1.6.8 with native extensions 
remote:  Installing uglifier 3.0.0 
remote:  Installing coffee-script 2.4.1 
remote:  Installing sprockets 3.6.0 
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:  Resolving dependencies.... 
remote:  Installing json 1.8.3 with native extensions 
remote:  Installing i18n 0.7.0 
remote:  Installing rake 11.1.2 
remote:  Installing thread_safe 0.3.5 
remote:  Installing minitest 5.9.0 
remote:  Installing erubis 2.7.0 
remote:  Installing builder 3.2.2 
remote:  Installing mini_portile2 2.1.0 
remote:  Installing pkg-config 1.1.7 
remote:  Installing rack 1.6.4 
remote:  Installing mime-types-data 3.2016.0521 
remote:  Using bundler 1.11.2 
remote:  Installing arel 6.0.3 
remote:  Installing execjs 2.7.0 
remote:  Installing coffee-script-source 1.10.0 
remote:  Installing thor 0.19.1 
remote:  Installing concurrent-ruby 1.0.2 
remote:  Installing multi_json 1.12.1 
remote:  Installing sass 3.4.22 
remote:  Installing sqlite3 1.3.11 with native extensions 
remote:  Installing tilt 2.0.5 
remote: 
remote:  Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 
remote: 
remote:  /tmp/build_6045ed930dd6a5b85911b00009c2001c/vendor/ruby-2.2.4/bin/ruby -r ./siteconf20160610-323-o54ilu.rb 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_6045ed930dd6a5b85911b00009c2001c/vendor/ruby-2.2.4/bin/$(RUBY_BASE_NAME) 
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}/lib 
remote: 
remote:  extconf failed, exit code 1 
remote: 
remote:  Gem files will remain installed in /tmp/build_6045ed930dd6a5b85911b00009c2001c/vendor/bundle/ruby/2.2.0/gems/sqlite3-1.3.11 for inspection. 
remote:  Results logged to /tmp/build_6045ed930dd6a5b85911b00009c2001c/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0-static/sqlite3-1.3.11/gem_make.out 
remote:  Installing tzinfo 1.2.2 
remote:  Installing rdoc 4.2.2 
remote:  Installing rack-test 0.6.3 
remote:  Installing mime-types 3.1 
remote:  Installing nokogiri 1.6.8 with native extensions 
remote:  Installing uglifier 3.0.0 
remote:  Installing coffee-script 2.4.1 
remote:  Installing sprockets 3.6.0 
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 agile-spire-70127. 
remote: 
To https://git.heroku.com/agile-spire-70127.git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to 'https://git.heroku.com/agile-spire-70127.git' 

Heroku的生成日誌:

-----> Ruby app detected 
-----> Compiling Ruby/Rails 
-----> Using Ruby version: ruby-2.2.4 
###### WARNING: 
     Removing `Gemfile.lock` because it was generated on Windows. 
     Bundler will do a full resolve so native gems are handled properly. 
     This may result in unexpected gem versions being used in your app. 
     In rare occasions Bundler may not be able to resolve your dependencies at all. 
     https://devcenter.heroku.com/articles/bundler-windows-gemfile 
-----> Installing dependencies using bundler 1.11.2 
     Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 
     Fetching gem metadata from https://rubygems.org/........... 
     Fetching version metadata from https://rubygems.org/... 
     Fetching dependency metadata from https://rubygems.org/.. 
     Resolving dependencies.... 
     Installing json 1.8.3 with native extensions 
     Installing i18n 0.7.0 
     Installing rake 11.1.2 
     Installing thread_safe 0.3.5 
     Installing minitest 5.9.0 
     Installing erubis 2.7.0 
     Installing builder 3.2.2 
     Installing mini_portile2 2.1.0 
     Installing pkg-config 1.1.7 
     Installing rack 1.6.4 
     Installing mime-types-data 3.2016.0521 
     Using bundler 1.11.2 
     Installing arel 6.0.3 
     Installing execjs 2.7.0 
     Installing coffee-script-source 1.10.0 
     Installing thor 0.19.1 
     Installing concurrent-ruby 1.0.2 
     Installing multi_json 1.12.1 
     Installing sass 3.4.22 
     Installing sqlite3 1.3.11 with native extensions 
     Installing tilt 2.0.5 
     Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 
     /tmp/build_6045ed930dd6a5b85911b00009c2001c/vendor/ruby-2.2.4/bin/ruby -r ./siteconf20160610-323-o54ilu.rb 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_6045ed930dd6a5b85911b00009c2001c/vendor/ruby-2.2.4/bin/$(RUBY_BASE_NAME) 
     --with-sqlite3-dir 
     --without-sqlite3-dir 
     --with-sqlite3-include 
     --without-sqlite3-include=${sqlite3-dir}/include 
     --with-sqlite3-lib 
     --without-sqlite3-lib=${sqlite3-dir}/lib 
     extconf failed, exit code 1 
     Gem files will remain installed in /tmp/build_6045ed930dd6a5b85911b00009c2001c/vendor/bundle/ruby/2.2.0/gems/sqlite3-1.3.11 for inspection. 
     Results logged to /tmp/build_6045ed930dd6a5b85911b00009c2001c/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0-static/sqlite3-1.3.11/gem_make.out 
     Installing tzinfo 1.2.2 
     Installing rdoc 4.2.2 
     Installing rack-test 0.6.3 
     Installing mime-types 3.1 
     Installing nokogiri 1.6.8 with native extensions 
     Installing uglifier 3.0.0 
     Installing coffee-script 2.4.1 
     Installing sprockets 3.6.0 
     An error occurred while installing sqlite3 (1.3.11), and Bundler cannot 
     continue. 
     Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling. 
     Bundler Output: Fetching gem metadata from https://rubygems.org/........... 
     Fetching version metadata from https://rubygems.org/... 
     Fetching dependency metadata from https://rubygems.org/.. 
     Resolving dependencies.... 
     Installing json 1.8.3 with native extensions 
     Installing i18n 0.7.0 
     Installing rake 11.1.2 
     Installing thread_safe 0.3.5 
     Installing minitest 5.9.0 
     Installing erubis 2.7.0 
     Installing builder 3.2.2 
     Installing mini_portile2 2.1.0 
     Installing pkg-config 1.1.7 
     Installing rack 1.6.4 
     Installing mime-types-data 3.2016.0521 
     Using bundler 1.11.2 
     Installing arel 6.0.3 
     Installing execjs 2.7.0 
     Installing coffee-script-source 1.10.0 
     Installing thor 0.19.1 
     Installing concurrent-ruby 1.0.2 
     Installing multi_json 1.12.1 
     Installing sass 3.4.22 
     Installing sqlite3 1.3.11 with native extensions 
     Installing tilt 2.0.5 

     Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 

     /tmp/build_6045ed930dd6a5b85911b00009c2001c/vendor/ruby-2.2.4/bin/ruby -r ./siteconf20160610-323-o54ilu.rb 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_6045ed930dd6a5b85911b00009c2001c/vendor/ruby-2.2.4/bin/$(RUBY_BASE_NAME) 
     --with-sqlite3-dir 
     --without-sqlite3-dir 
     --with-sqlite3-include 
     --without-sqlite3-include=${sqlite3-dir}/include 
     --with-sqlite3-lib 
     --without-sqlite3-lib=${sqlite3-dir}/lib 

     extconf failed, exit code 1 

     Gem files will remain installed in /tmp/build_6045ed930dd6a5b85911b00009c2001c/vendor/bundle/ruby/2.2.0/gems/sqlite3-1.3.11 for inspection. 
     Results logged to /tmp/build_6045ed930dd6a5b85911b00009c2001c/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0-static/sqlite3-1.3.11/gem_make.out 
     Installing tzinfo 1.2.2 
     Installing rdoc 4.2.2 
     Installing rack-test 0.6.3 
     Installing mime-types 3.1 
     Installing nokogiri 1.6.8 with native extensions 
     Installing uglifier 3.0.0 
     Installing coffee-script 2.4.1 
     Installing sprockets 3.6.0 
     An error occurred while installing sqlite3 (1.3.11), and Bundler cannot 
     continue. 
     Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling. 
! 
!  Failed to install gems via Bundler. 
!  
!  Detected sqlite3 gem which is not supported on Heroku. 
!  https://devcenter.heroku.com/articles/sqlite3 
! 
!  Push rejected, failed to compile Ruby app 

寶石文件:

source 'https://rubygems.org' 


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 
gem 'rails', '4.2.5.1' 
# Use sqlite3 as the database for Active Record 
gem 'sqlite3' 
# 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 

# 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' 
end 

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

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem 
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] 

Gemfile.local

Gemfile.local 
gem 'activerecord-postgresql-adapter 

謝謝!我按照建議進行了更改,但部署後仍存在問題。這可能是打開應用程序時404的原因。我已經添加了2.2.4紅寶石到Gemfile &已刪除的Gem.lock。

\test_app>git push heroku master 
objects: 101, done. 
mpression using up to 2 threads. 
ing objects: 100% (93/93), done. 
objects: 100% (101/101), 22.60 KiB | 0 bytes/s, done. 
1 (delta 11), reused 0 (delta 0) 
Compressing source files... done. 
Building source: 

-----> Ruby app detected 
-----> Compiling Ruby/Rails 
-----> Using Ruby version: ruby-2.2.4 
###### WARNING: 
     Removing `Gemfile.lock` because it was generated on Windows. 
     Bundler will do a full resolve so native gems are handled properly. 
     This may result in unexpected gem versions being used in your app. 
     In rare occasions Bundler may not be able to resolve your dependencies at all. 
     https://devcenter.heroku.com/articles/bundler-windows-gemfile 

-----> Installing dependencies using bundler 1.11.2 
     Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 
     Fetching gem metadata from https://rubygems.org/........... 
     Fetching version metadata from https://rubygems.org/... 
     Fetching dependency metadata from https://rubygems.org/.. 
     Resolving dependencies.... 
     Installing rake 11.2.2 
     Installing json 1.8.3 with native extensions 
     Installing i18n 0.7.0 
     Installing thread_safe 0.3.5 
     Installing minitest 5.9.0 
     Installing builder 3.2.2 
     Installing erubis 2.7.0 
     Installing mini_portile2 2.1.0 
     Installing pkg-config 1.1.7 
     Installing rack 1.6.4 
     Using bundler 1.11.2 
     Installing mime-types-data 3.2016.0521 
     Installing arel 6.0.3 
     Installing coffee-script-source 1.10.0 
     Installing execjs 2.7.0 
     Installing thor 0.19.1 
     Installing multi_json 1.12.1 
     Installing concurrent-ruby 1.0.2 
     Installing pg 0.18.4 with native extensions 
     Installing rails_serve_static_assets 0.0.5 
     Installing rails_stdout_logging 0.0.5 
     Installing sass 3.4.22 
     Installing tilt 2.0.5 
     Installing tzinfo 1.2.2 
     Installing nokogiri 1.6.8 with native extensions 
     Installing rdoc 4.2.2 
     Installing rack-test 0.6.3 
     Installing mime-types 3.1 
     Installing coffee-script 2.4.1 
     Installing uglifier 3.0.0 
     Installing sprockets 3.6.0 
     Installing rails_12factor 0.0.3 
     Installing activesupport 4.2.5.1 
     Installing sdoc 0.4.1 
     Installing mail 2.6.4 
     Installing rails-deprecated_sanitizer 1.0.3 
     Installing globalid 0.3.6 
     Installing activemodel 4.2.5.1 
     Installing jbuilder 2.5.0 
     Installing activejob 4.2.5.1 
     Installing activerecord 4.2.5.1 
     Installing rails-dom-testing 1.0.7 
     Installing loofah 2.0.3 
     Installing rails-html-sanitizer 1.0.3 
     Installing actionview 4.2.5.1 
     Installing actionpack 4.2.5.1 
     Installing actionmailer 4.2.5.1 
     Installing sprockets-rails 3.0.4 
     Installing railties 4.2.5.1 
     Installing coffee-rails 4.1.1 
     Installing jquery-rails 4.1.1 
     Installing rails 4.2.5.1 
     Installing sass-rails 5.0.4 
     Installing turbolinks 2.5.3 
     Bundle complete! 13 Gemfile dependencies, 54 gems now installed. 
     Gems in the groups development and test were not installed. 
     Bundled gems are installed into ./vendor/bundle. 
     Post-install message from rdoc: 
     Depending on your version of ruby, you may need to install ruby rdoc/ri data: 
     <= 1.8.6 : unsupported 
     = 1.8.7 : gem install rdoc-data; rdoc-data --install 
     = 1.9.1 : gem install rdoc-data; rdoc-data --install 
     >= 1.9.2 : nothing to do! Yay! 
     Bundle completed (30.83s) 
     Cleaning up the bundler cache. 
-----> Preparing app for Rails asset pipeline 
     Running: rake assets:precompile 
     I, [2016-06-16T15:01:23.677344 #1026] INFO -- : Writing /tmp/build_d5245f6cdcdd591d927b90b3ee05e2bc/public/assets/application-b0426e496058d3d784915d30693e0d86e3f1908fa66e11169e89ec 
     I, [2016-06-16T15:01:23.677998 #1026] INFO -- : Writing /tmp/build_d5245f6cdcdd591d927b90b3ee05e2bc/public/assets/application-b0426e496058d3d784915d30693e0d86e3f1908fa66e11169e89ec 

     I, [2016-06-16T15:01:23.709388 #1026] INFO -- : Writing /tmp/build_d5245f6cdcdd591d927b90b3ee05e2bc/public/assets/application-0723cb9a2dd5a514d954f70e0fe0b89f6f9f1ae3a375c182f43b5f 

     I, [2016-06-16T15:01:23.709596 #1026] INFO -- : Writing /tmp/build_d5245f6cdcdd591d927b90b3ee05e2bc/public/assets/application-0723cb9a2dd5a514d954f70e0fe0b89f6f9f1ae3a375c182f43b5f 

     Asset precompilation completed (4.30s) 
     Cleaning assets 
     Running: rake assets:clean 

###### WARNING: 
     You have not declared a Ruby version in your Gemfile. 
     To set your Ruby version add this line to your Gemfile: 
     ruby '2.2.4' 
     # See https://devcenter.heroku.com/articles/ruby-versions for more information. 

###### WARNING: 
     Removing `Gemfile.lock` because it was generated on Windows. 
     Bundler will do a full resolve so native gems are handled properly. 
     This may result in unexpected gem versions being used in your app. 
     In rare occasions Bundler may not be able to resolve your dependencies at all. 
     https://devcenter.heroku.com/articles/bundler-windows-gemfile 

###### WARNING: 
     No Procfile detected, using the default web server. 
     We recommend explicitly declaring how to boot your server process via a Procfile. 
     https://devcenter.heroku.com/articles/ruby-default-web-server 

-----> Discovering process types 
     Procfile declares types  -> (none) 
     Default types for buildpack -> console, rake, web, worker 

-----> Compressing... 
     Done: 30.8M 
-----> Launching... 
     Released v5 
     https://agile-spire-70127.herokuapp.com/ deployed to Heroku 

Verifying deploy... done. 
://git.heroku.com/agile-spire-70127.git 
branch]  master -> master 

\test_app>git push heroku master 
ng up-to-date 

爲了解決Procfile

git add . 
e replaced by CRLF in Gemfile. 
its original line endings in your working directory. 

git commit -m "Procfile" 
F will be replaced by CRLF in Gemfile. 
its original line endings in your working directory. 

e replaced by CRLF in Gemfile. 
its original line endings in your working directory. 
1 insertion(+), 169 deletions(-) 
4 Gemfile.lock 

git push heroku 
branch master has no upstream branch. 
t branch and set the remote as upstream, use 

-upstream heroku master 

然而,沒有differnce到404錯誤。

+0

可以請你列出Heroku的日誌?你在主分支上嗎?你也可以添加你的gemfile嗎? – Nirupa

+0

Heroku日誌:agile-spire-70127 –

+0

這不是整個日誌文件。轉到您的應用程序目錄並輸入「heroku日誌」。在你的問題中添加結果。 – Nirupa

回答

0

請檢查Gemfile.rb,請將您的'sqlite3'放入開發組中,像這樣。

group :development do 
gem 'sqlite3' 
end 

group :production do 
    gem 'pg'  # Use postgresql as the database for Active Record got heroku 
    gem 'rails_12factor' 
end 

請刪除您的應用程序中的Gemfile.lock,請再次進行捆綁安裝或捆綁更新。 並將您的代碼推送到存儲庫並完成提交。新的Gemfile.rb和Gemfile.lock也提交。

後來終於做

git push heroku master