0
我已經使用Ruby on Rails和AngularJS構建了一個應用程序。它在我的機器上完成並在本地工作。我試圖把它推到Heroku的,但我不斷收到此錯誤:AngularJS和Ruby on Rails Heroku部署
remote: -----> Fetching set buildpack https://github.com/heroku/heroku buildpack
remote:
remote: ! Push rejected, failed to detect set buildpack https://github.com/
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-fa
remote:
remote: Verifying deploy....
remote:
remote: ! Push rejected to aqueous-temple-93632.
remote:
To https://git.heroku.com/aqueous-temple-93632.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/aqueous-temple-93632.
我已經看過不同的教程,並嘗試了所有的建議和似乎沒有任何工作。我的文件結構是:
我創建的應用程序中使用heroku create
登錄後,試圖TP一推git push <app name> master
我已閱讀,Heroku的自動發現buildpack等我,如果事實不知道我正在使用angularJS和RUby on Rails是什麼問題,以及是否需要手動添加額外的構建包。
不知道是否是培訓相關,但這裏是寶石文件
source 'http://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.8'
# Use sqlite3 as the database for Active Record
group :development do
gem 'sqlite3'
end
#Using postgres SQL as the db
group :production do
gem 'pg'
gem "activerecord-postgresql-adapter"
end
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
#Angular js gem
gem 'angularjs-rails'
#Angular js material designs gem
gem 'rails-angular-material'
gem 'angular-rails-templates'
gem 'bower-rails'
gem "heroku"
# 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
# Use debugger
# gem 'debugger', group: [:development, :test]
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin]
我猜你的應用嵌套在一個額外的'angApp'目錄內。您的Rails應用程序需要位於您的GIT存儲庫的項目根目錄中,以使heroku buildpack正常工作。 – max
對不起,你能詳細闡述一下你的意思嗎,我對這一切都很陌生。我雖然只需要將.git文件放置在主要的angRails目錄中 – Brennan
「.git」目錄需要位於Rails應用程序根目錄中。這意味着它應該與'Gemfile'' \ app'等目錄相同,而不是上面的一個目錄。 – max