Heroku不验证;部署Heroku服务器问题,发生了什么? - Heroku not authenticating; deploying heroku server issues; what's happening?

- 此内容更新于:2016-02-02
主题:

我有严重的问题让Heroku和github与我合作。我注意到我不得到身份验证Heroku一旦我放在我的登录信息:我不得到身份验证信息,我的老师说的东西是非常重要的。我不知道为什么。我都设置正确,包括适当的ssh密钥,然后我通过了:这就是事情开始真的错了。我不会,我只是没有任何添加的迹象。后,我每次都得到同样的错误:我已经尝试改变应用程序。rb文件,以防我也调整Gemfile以确保它有:既不工作。由于任何可以帮助的人。

原文:

I am having serious problems getting Heroku and github to work with me.

I notice that I do not get an authentication from Heroku once I put in my log in information:

heroku login
Enter your Heroku credentials.
Email: blank@gmail.com
Password (typing will be hidden): 
Logged in as blank@gmail.com

I do not get an authentication message, something my instructor said was very important. I have no idea why. I have everything set up correctly, including the proper ssh key, which I got via:

heroku keys:add

Then

heroku create

This is where things start really going wrong. I never get

Git remote heroku added

Instead, I just get

Creating app... done, stack is cedar-14
https://agile-lake-38079.herokuapp.com/ | https://git.heroku.com/agilelake-38079.git

With no indication of anything added.

After

git push origin master

and

git push heroku master

I get this same error every single time:

'Counting objects: 66, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (55/55), done.
Writing objects: 100% (66/66), 16.44 KiB | 0 bytes/s, done.
Total 66 (delta 4), 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.1 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.5.0
remote:        Installing i18n 0.7.0
remote:        Installing json 1.8.3
remote:        Installing minitest 5.8.4
remote:        Installing thread_safe 0.3.5
remote:        Installing tzinfo 1.2.2
remote:        Installing activesupport 4.1.0
remote:        Installing builder 3.2.2
remote:        Installing erubis 2.7.0
remote:        Installing actionview 4.1.0
remote:        Installing rack 1.5.5
remote:        Installing rack-test 0.6.3
remote:        Installing actionpack 4.1.0
remote:        Installing mime-types 1.25.1
remote:        Installing polyglot 0.3.5
remote:        Installing treetop 1.4.15
remote:        Installing mail 2.5.4
remote:        Installing actionmailer 4.1.0
remote:        Installing activemodel 4.1.0
remote:        Installing arel 5.0.1.20140414130214
remote:        Installing activerecord 4.1.0
remote:        Installing coffee-script-source 1.10.0
remote:        Installing execjs 2.6.0
remote:        Installing coffee-script 2.4.1
remote:        Installing thor 0.19.1
remote:        Installing railties 4.1.0
remote:        Installing coffee-rails 4.0.1
remote:        Installing hike 1.2.3
remote:        Installing multi_json 1.11.2
remote:        Installing jbuilder 2.0.0
remote:        Installing jquery-rails 3.1.4
remote:        Installing pg 0.18.4
remote:        Using bundler 1.9.7
remote:        Installing tilt 1.4.1
remote:        Installing sprockets 2.11.0
remote:        Installing sprockets-rails 2.3.3
remote:        Installing rails 4.1.0
remote:        Installing rails_serve_static_assets 0.0.4
remote:        Installing rails_stdout_logging 0.0.4
remote:        Installing rails_12factor 0.0.3
remote:        Installing rdoc 4.2.1
remote:        Installing sass 3.2.19
remote:        Installing sass-rails 4.0.3
remote:        Installing sdoc 0.4.0
remote:        Installing turbolinks 2.5.3
remote:        Installing uglifier 1.3.0
remote:        Bundle complete! 14 Gemfile dependencies, 46 gems now installed.
remote:        Gems in the groups development and test were not installed.
remote:        Bundled gems are installed into ./vendor/bundle.
remote:        Post-install message from rdoc:
remote:        Depending on your version of ruby, you may need to install ruby rdoc/ri data:
remote:        <= 1.8.6 : unsupported
remote:        = 1.8.7 : gem install rdoc-data; rdoc-data --install
remote:        = 1.9.1 : gem install rdoc-data; rdoc-data --install
remote:        >= 1.9.2 : nothing to do! Yay!
remote:        Bundle completed (40.23s)
remote:        Cleaning up the bundler cache.
remote: -----> Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        rake aborted!
remote:        NoMethodError: undefined method `raise_in_transactional_callbacks=' for ActiveRecord::Base:Class
remote:        /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.0/lib/active_record/dynamic_matchers.rb:26:in `method_missing'
remote:        /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.0/lib/active_record/railtie.rb:110:in `block (3 levels) in <class:Railtie>'
remote:        /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.0/lib/active_record/railtie.rb:109:in `each'
remote:        /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.0/lib/active_record/railtie.rb:109:in `block (2 levels) in <class:Railtie>'
remote:        /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
remote:        /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
remote:        /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
remote:        /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:27:in `each'
remote:        /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
remote:        /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.0/lib/active_record/railtie.rb:108:in `block in <class:Railtie>'
remote:        /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/initializable.rb:30:in `instance_exec'
remote:        /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/initializable.rb:30:in `run'
remote:        /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/initializable.rb:55:in `block in run_initializers'
remote:        /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/initializable.rb:54:in `run_initializers'
remote:        /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/application.rb:288:in `initialize!'
remote:        /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/config/environment.rb:5:in `<top (required)>'
remote:        /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
remote:        /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `block in require'
remote:        /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:232:in `load_dependency'
remote:        /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
remote:        /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/application.rb:264:in `require_environment!'
remote:        /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0/lib/rails/application.rb:367:in `block in run_tasks_blocks'
remote:        /tmp/build_8ed55ea28867430d1f1b83cfeabc180a/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
remote:        Tasks: TOP => environment
remote:        (See full trace by running task with --trace)
remote:  !
remote:  !     Precompiling assets failed.
remote:  !
remote: 
remote:  !     Push rejected, failed to compile Ruby app
remote: 
remote: Verifying deploy...
remote: 
remote: !       Push rejected to agile-lake-38079.
remote: 
To https://git.heroku.com/agile-lake-38079.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/agile-lake-38079.git''

I have tried altering the application.rb file, just in case, and I have also tweaked my Gemfile to make sure it has:

group :production do
  gem 'pg'
  gem 'rails_12factor'
end

Neither have worked. Thanks to anyone who can help.

网友:看这里stackoverflow.com/a/28008145/3896300

(原文:Look here stackoverflow.com/a/28008145/3896300)

楼主:谢谢哥哥,解决它!

(原文:Thanks brother, that solved it!)

解决方案:
您的身份验证是好的:)推动Heroku时,它会创建一个应用程序的段塞?认为它像一个压缩,生产就绪,production-tuned包。你的问题在于当Heroku试图创建这个鼻涕虫。您的日志输出这条线:远程:NoMethodError:未定义方法的raise_in_transactional_callbacks='ActiveRecord::基础:类模型继承ActiveRecord::基地,所以,应该告诉你,这是在你的模型代码(很有可能)。在本地,可以运行Heroku如何治疗应用。
原文:

Your authentication is fine :)

When you push to Heroku, it creates a slug of your application — think of it like a compressed, production-ready and production-tuned package.

Your problem lies when Heroku tries to create this slug. Your log outputs this line:

remote: NoMethodError: undefined method `raise_in_transactional_callbacks=' for ActiveRecord::Base:Class

Models inherit from ActiveRecord::Base, so that should tell you that it's something (very likely) in your model code.

Locally, you can run rake assets:precompile RAILS_ENV=production to see how Heroku would treat app.