ruby-on-rails-3 - Heroku_Accounts 和 Bundler 的问题

标签 ruby-on-rails-3 heroku

我一直在将项目推送到 Heroku,没有出现任何问题。刚刚安装了 Heroku_Accounts 插件(我很高兴使用它!)。现在当我推送到heroku时遇到以下问题:

$ git push heroku master
Counting objects: 1338, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (1103/1103), done.
Writing objects: 100% (1338/1338), 1.27 MiB, done.
Total 1338 (delta 694), reused 417 (delta 182)

-----> Heroku receiving push
-----> Rails app detected
-----> Detected Rails is not set to serve static_assets
       Installing rails3_serve_static_assets... done
-----> Configure Rails 3 to disable x-sendfile
       Installing rails3_disable_x_sendfile... done
-----> Configure Rails to log to stdout
       Installing rails_log_stdout... done
-----> Gemfile detected, running Bundler version 1.0.7
       Unresolved dependencies detected; Installing...
       Using --without development:test
       Fetching source index for http://rubygems.org/
       Installing rake (0.9.2) 
       Installing abstract (1.0.0) 
       Installing activesupport (3.0.4) 
       Installing builder (2.1.2) 
       Installing i18n (0.6.0) 
       Installing activemodel (3.0.4) 
       Installing erubis (2.6.6) 
       Installing rack (1.2.3) 
       Installing rack-mount (0.6.14) 
       Installing rack-test (0.5.7) 
       Installing tzinfo (0.3.29) 
       Installing actionpack (3.0.4) 
       Installing mime-types (1.16) 
       Installing polyglot (0.3.1) 
       Installing treetop (1.4.9) 
       Installing mail (2.2.19) 
       Installing actionmailer (3.0.4) 
       Installing arel (2.0.10) 
       Installing activerecord (3.0.4) 
       Installing activeresource (3.0.4) 
       Installing braintree (2.6.1) 
       Installing client_side_validations (3.0.4) 
       Installing columnize (0.3.4) 
       Installing gravatar_image_tag (1.0.0.pre2) 
       Installing rbx-require-relative (0.0.5) /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/installer.rb:164:in `install': rbx-require-relative requires Ruby version ~> 1.8.7. (Gem::InstallError)
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/source.rb:95:in `install'
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/installer.rb:55:in `block in run'
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `block in each'
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/installer.rb:44:in `run'
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/installer.rb:8:in `install'
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/cli.rb:225:in `install'
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in `run'
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor.rb:246:in `dispatch'
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/base.rb:389:in `start'
        from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/bin/bundle:13:in `<top (required)>'
        from /usr/ruby1.9.2/bin/bundle:19:in `load'
        from /usr/ruby1.9.2/bin/bundle:19:in `<main>'
       FAILED: http://devcenter.heroku.com/articles/bundler
 !     Heroku push rejected, failed to install gems via Bundler

To <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8aede3fecae2eff8e5e1ffa4e9e5e7" rel="noreferrer noopener nofollow">[email protected]</a>:cold-warrior-388.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="bcdbd5c8fcd4d9ced3d7c992dfd3d1" rel="noreferrer noopener nofollow">[email protected]</a>:cold-warrior-388.git'
daniel-kents-macbook-pro:steepr Daniel$   

这是我的远程网址:

$ git remote -v
heroku  <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0f68667b4f676a7d60647a216c6062" rel="noreferrer noopener nofollow">[email protected]</a>:cold-warrior-388.git (fetch)
heroku  <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="75121c01351d10071a1e005b161a18" rel="noreferrer noopener nofollow">[email protected]</a>:cold-warrior-388.git (push)
origin  <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7c1b15083c1b150814091e521f1311" rel="noreferrer noopener nofollow">[email protected]</a>:steepr.git (fetch)
origin  <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="aec9c7daeec9c7dac6dbcc80cdc1c3" rel="noreferrer noopener nofollow">[email protected]</a>:steepr.git (push)

这是我的 .ssh/config

# default 

Host github.com
  HostName github.com
  User git
  IdentityFile /Users/Daniel/.ssh/id_rsa

# steepr

Host github-steepr
  HostName github.com
  User git
  IdentityFile /Users/Daniel/.ssh/steepr.id_rsa.pub

Host heroku.steepr
  HostName heroku.com
  IdentityFile ~/.ssh/identity.heroku.steepr
  IdentitiesOnly yes

Host heroku.personal
  HostName heroku.com
  IdentityFile ~/.ssh/identity.heroku.personal
  IdentitiesOnly yes

就像我说的,在添加 Heroku_Accounts 之前,已经很好地推送到了 Heroku。该插件会对 Bundler 执行某些操作吗?我的 gem ?

谢谢。

最佳答案

我通过注释掉gem 'Ruby-debug'解决了这个问题。这是我在 Stackoverflow 上其他地方读到的内容,但当我第一次尝试时,它不起作用。我不确定我第一次做错了什么,但如果您尝试这种方法,请确保:

(1) 捆绑安装

(2)提交并推送到git

(3) 然后推送到heroku

祝你好运!

@thatdankent

关于ruby-on-rails-3 - Heroku_Accounts 和 Bundler 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6647644/

相关文章:

angular - 使用正确的环境文件将 Angular 应用程序部署到 Heroku

提供预编译 Assets 时,Heroku H12 请求超时错误

node.js - 重定向你太多次 - Heroku 上的 Express/node

sql - play20 ebean 生成的 sql 在 postgresql 上抛出语法错误

jquery - 在 .js.erb 文件中使用 $(this) - Ruby on Rails AJAX

ruby-on-rails-3 - 无法识别 lib 目录中引入的新验证器类并抛出错误

ruby-on-rails - Rails 3 路由 : add action to all resources in namespace

ruby-on-rails - redirect_to @语法含义

ruby-on-rails - rails 3 : How Lazy Loading really works on production

ruby-on-rails - Ruby on Rails应用程序可在本地工作,但在heroku上不工作