本文介绍了Heroku推送被拒绝:在源代码中找不到jquery-rails-2.0.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试将Enki gem博客推送到Heroku,并且出现错误
无法找到jquery -rails-2.0.0在任何来源中
然而,在Gemfile中我有
`gem'jquery-rails'`
我从来没有遇到过使用此设置推送Enki博客时出现问题的情况。以下是完整的错误消息:
运行:bundle install --without development:test --path vendor / bundle --binstubs bin / --deployment
从https://rubygems.org / .......
获取gem元数据在任何源
中都找不到jquery-rails-2.0.0!
!无法通过Bundler安装宝石。
!
! Heroku推送被拒绝,未能编译Ruby / rails应用程序
在收到错误消息后,我将其添加到gemfile
gem'jquery-rails-2.0.0'
我得到了这个错误信息
找不到gem'jquery -rails-2.0.0(> = 0)java'在本机上可用的gem中。
然后我试着做
gem install jquery-rails
它给了我
成功安装jquery-rails-2.0.2
1个安装gem
为jquery-rails-2.0.2安装ri文档...
为jquery-rails-2.0.2安装RDoc文档...
但是推送没有起作用,同样的错误
-----> Heroku接收推送
-----> Ruby / Rails应用程序检测到
----->使用Bundler版本1.2.0.rc安装依赖关系
运行:bundle安装 - 无需开发:test --path vendor / bundle --binstubs bin / --deployment
从https://获取gem元数据rubygems.org / .......
在任何源代码
中都找不到jquery-rails-2.0.0!
!无法通过Bundler安装宝石。
!
! Heroku推送被拒绝,未能编译Ruby / rails应用程序
这是gemfile
source'https://rubygems.org'
gem'rails','3.2.6'
gem'heroku'
#Bundle edge Rails改为:
#gem'rails',:git => 'git://github.com/rails/rails.git'
#默认情况下,生产环境中仅用于资产的Gems并不需要
#。
group:assets do
gem'sass-rails','〜> 3.2.3'
gem'咖啡栏','〜> 3.2.1'
gem'uglifier','> = 1.0.3'
结束
组:开发,:测试
gem 'sqlite3'
end
group:production do
gem'pg'
end
group:production do
gem'thin'
end
platforms:jruby do
gem'activerecord -jdbcsqlite3-adapter'
gem'trinidad'
gem'jruby-openssl'
end
gem'jquery-rails'
#gem'jquery-rails-2.0.0'
使用独角兽作为web服务器
#gem'unicorn'
#使用Capistrano进行部署
#gem'capistrano'
#使用调试器
#gem'ruby-debug'
#捆绑额外的宝石:
gem'RedCloth','〜> 4.2.9',:require => 'redcloth'
gem'ruby-openid',:require => 'openid'
gem'rack-openid',:require => 'rack / openid'
gem'aaronh-chronic',:require => 'chronic'#修正为1.9.2
gem'coderay'
gem'lesstile'
gem'formtastic'
gem'will_paginate','〜> 3.0.2'
gem'exception_notification','〜> 2.5.2'
gem'open_id_authentication'
#为本地环境捆绑宝石。确保
#在此组中放置纯测试宝石,以便它们的生成器
#和rake任务可用于开发模式:
group:test do
gem'database_cleaner'
gem'cucumber-rails',:require => false
gem'cucumber-websteps',:require => false
gem'factory_girl'
gem'rspec'
gem'nokogiri','〜> 1.5.0'
gem'webrat'
end
group:development,:test do
gem'rspec-rails'
end
解决方案
为我工作:
- 删除Gemfile.lock
- 从行中删除了rails版本=> gem'rails'(jquery已经没有av数字)
- 运行命令bundle install
- 运行bundle update jquery-rails以确保所有内容都已更新
- 重要的是,提交新的.lock文件=>运行git add。和git commit ...
- 全部推送
I'm trying to push an Enki gem blog to Heroku and I'm getting an error
Could not find jquery-rails-2.0.0 in any of the sources
However, in the Gemfile I had
`gem 'jquery-rails'`
and I've never had a problem pushing an Enki blog with this setup before. Here's the full error message
Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment
Fetching gem metadata from https://rubygems.org/.......
Could not find jquery-rails-2.0.0 in any of the sources
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app
After I got the error message I added this to the gemfile
gem 'jquery-rails-2.0.0'
I got this error message
Could not find gem 'jquery-rails-2.0.0 (>= 0) java' in the gems available on this machine.
I then tried to do
gem install jquery-rails
It gave me
Successfully installed jquery-rails-2.0.2
1 gem installed
Installing ri documentation for jquery-rails-2.0.2...
Installing RDoc documentation for jquery-rails-2.0.2...
But the push didn't work, same error
-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.2.0.rc
Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment
Fetching gem metadata from https://rubygems.org/.......
Could not find jquery-rails-2.0.0 in any of the sources
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app
this is the gemfile
source 'https://rubygems.org'
gem 'rails', '3.2.6'
gem 'heroku'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg'
end
group :production do
gem 'thin'
end
platforms :jruby do
gem 'activerecord-jdbcsqlite3-adapter'
gem 'trinidad'
gem 'jruby-openssl'
end
gem 'jquery-rails'
#gem 'jquery-rails-2.0.0'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug'
# Bundle the extra gems:
gem 'RedCloth', '~> 4.2.9', :require => 'redcloth'
gem 'ruby-openid', :require => 'openid'
gem 'rack-openid', :require => 'rack/openid'
gem 'aaronh-chronic', :require => 'chronic' # Fixes for 1.9.2
gem 'coderay'
gem 'lesstile'
gem 'formtastic'
gem 'will_paginate', '~> 3.0.2'
gem 'exception_notification', '~> 2.5.2'
gem 'open_id_authentication'
# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
group :test do
gem 'database_cleaner'
gem 'cucumber-rails', :require => false
gem 'cucumber-websteps', :require => false
gem 'factory_girl'
gem 'rspec'
gem 'nokogiri', '~> 1.5.0'
gem 'webrat'
end
group :development, :test do
gem 'rspec-rails'
end
解决方案
Worked for me:
- delete the Gemfile.lock
- removed the rails version from the line => gem 'rails' (jquery was already without a v number)
- run the command "bundle install"
- run also "bundle update jquery-rails" to make sure everything is updated
- IMPORTANT, commit the new .lock file => run the "git add ." and "git commit ..."
- push everything
这篇关于Heroku推送被拒绝:在源代码中找不到jquery-rails-2.0.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!