不能推到Heroku(找不到Rake 10.3.2) [英] Can't Push To Heroku (Can't find Rake 10.3.2)

查看:131
本文介绍了不能推到Heroku(找不到Rake 10.3.2)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这里引导新手。我正在通过Ubuntu 14.04虚拟机上的railstutorial.org上的教程。在我到达heroku之前一直很顺利航行。当我想将我的应用程序推送到heroku时,它抱怨找不到rake-10.3.2。我检查了heroku,应用程序似乎是空的。但是,我在我的应用程序中使用了rake-10.3.2,如果使用bundle show rake,它会显示正确的版本。

  brandon @ brandon-virtualbox:〜/ rails_projects / first_app $ bundle show rake 
/home/brandon/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/rake-10.3.2

这看起来不错,但是当我尝试推送到heroku时,我得到:

  brandon @ brandon-virtualbox:〜/ rails_projects / first_app $ git push heroku master 
初始化仓库,完成。
计数对象:66,完成。
压缩对象:100%(55/55),完成。
写作对象:100%(66/66),14.46 KiB | 0字节/秒,完成。
总计66(增量6),重用0(增量0)

-----> Ruby应用检测到
----->编译Ruby / Rails
----->使用Ruby版本:ruby-2.0.0
----->使用1.6.3
安装依赖项运行:bundle install --without development:test --path vendor / bundle --binstubs vendor / bundle / bin -j4 --deployment
从https获取gem元数据:/ /rubygems.org/ ..........
从https://rubygems.org/获取额外的元数据..
在任何源代码中找不到rake-10.3.2
Bundler输出:从https://rubygems.org / ..........获取gem元数据
从https://rubygems.org/获取其他元数据..
在任何源
中都找不到rake-10.3.2!
!无法通过Bundler安装宝石。


!推送被拒绝,未能编译Ruby应用程序

至git@heroku.com:dry-springs-4465.git
! [remote rejected] master - > master(pre-receive hook refused)
错误:无法将某些参考文献推送到'git@heroku.com:dry-springs-4465.git'

我注意到它使用的版本是2.0.0(我已经安装),但它试图使用1.6.3安装依赖项。我不确定这是否与问题有关。我的Gemfile在这里:

  source'https://rubygems.org'
ruby​​'2.0.0'
#ruby-gemset = railstutorial_rails_4_0

gem'rails','4.0.8'

group:development do
gem'sqlite3','1.3 .8'
end

gem'sass-rails','4.0.1'
gem'uglifier','2.1.1'
gem'coffee- Rails','4.0.1'
gem'jquery-rails','3.0.4'
gem'turbolinks','1.1.1'
gem'jbuilder','1.0。 2'

group:doc do
gem'sdoc','0.3.20',要求:false
end

group:production do
gem'pg','0.15.1'
gem'rails_12factor','0.0.2'
end

我已经搞了一会儿,并没有运气。我也使用RVM,但我是一个全新手,所以我不确定会有什么样的影响。如果有人知道发生了什么,我会很感激!



谢谢!

解决方案

在我的例子中,这是因为我在 vendor / cache gem,但不是全部 C>。看来,当 vendor / cache 出现时,Heroku不会去任何其他源。



I通过将我需要缓存的gem移动到另一个位置,然后从版本控制中移除供应商/缓存文件夹来解决此问题。


rails newbie here. I'm working through the tutorial on railstutorial.org on a Ubuntu 14.04 virtual machine. It's been pretty smooth sailing up until I got to heroku. When I want to push my app to heroku, it complains that it could not find rake-10.3.2. I checked heroku, and the application seems to be empty. However, I have rake-10.3.2 in my application, and if use "bundle show rake", it shows the correct version.

brandon@brandon-virtualbox:~/rails_projects/first_app$ bundle show rake
/home/brandon/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/rake-10.3.2

That looks okay, but when I try to push it to heroku, I get:

brandon@brandon-virtualbox:~/rails_projects/first_app$ git push heroku master
Initializing repository, done.
Counting objects: 66, done.
Compressing objects: 100% (55/55), done.
Writing objects: 100% (66/66), 14.46 KiB | 0 bytes/s, done.
Total 66 (delta 6), reused 0 (delta 0)

-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using 1.6.3
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
       Fetching gem metadata from https://rubygems.org/..........
       Fetching additional metadata from https://rubygems.org/..
       Could not find rake-10.3.2 in any of the sources
       Bundler Output: Fetching gem metadata from https://rubygems.org/..........
       Fetching additional metadata from https://rubygems.org/..
       Could not find rake-10.3.2 in any of the sources
 !
 !     Failed to install gems via Bundler.
 !

 !     Push rejected, failed to compile Ruby app

To git@heroku.com:dry-springs-4465.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:dry-springs-4465.git'

I noticed that it's using version 2.0.0 (which I have installed), but it's attempting to install the dependencies using 1.6.3. I'm not sure if that is related to the issue or not. My Gemfile is here:

source 'https://rubygems.org'
ruby '2.0.0'
#ruby-gemset=railstutorial_rails_4_0

gem 'rails', '4.0.8'

group :development do
  gem 'sqlite3', '1.3.8'
end

gem 'sass-rails', '4.0.1'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '3.0.4'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'

group :doc do
  gem 'sdoc', '0.3.20', require: false
end

group :production do
  gem 'pg', '0.15.1'
  gem 'rails_12factor', '0.0.2'
end

I've been messing with it for a while, and have had no luck. I'm using RVM as well, but I'm a total newbie so I'm not sure what kind of impact that would have. If anyone would know what's going on, I'd appreciate it!

Thanks!

解决方案

In my case, this was caused because I had some gems, but not all of them, under version control in vendor/cache. It seems that when vendor/cache is present, Heroku will not go to any of the other sources.

I solved this problem by moving the gem that I needed cached to another location, and then removing the vendor/cache folder from version control.

这篇关于不能推到Heroku(找不到Rake 10.3.2)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆