I'm trying to push an Enki gem blog to Heroku and I'm getting an error
我正在尝试将一个Enki gem博客推向Heroku,我收到了一个错误
Could not find jquery-rails-2.0.0 in any of the sources
However, in the Gemfile I had
但是,在Gemfile中我有
`gem 'jquery-rails'`
and I've never had a problem pushing an Enki blog with this setup before. Here's the full error message
我以前从来没有遇到过使用此设置推送Enki博客的问题。这是完整的错误消息
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
收到错误消息后,我将其添加到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
这是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
5 个解决方案
#1
13
Worked for me:
为我工作:
- delete the Gemfile.lock
- 删除Gemfile.lock
- removed the rails version from the line => gem 'rails' (jquery was already without a v number)
- 从line => gem'trail'中删除了rails版本(jquery已经没有v号)
- run the command "bundle install"
- 运行命令“bundle install”
- run also "bundle update jquery-rails" to make sure everything is updated
- 运行“捆绑更新jquery-rails”以确保一切都更新
- IMPORTANT, commit the new .lock file => run the "git add ." and "git commit ..."
- 重要的是,提交新的.lock文件=>运行“git add”。和“git commit ...”
- push everything
- 推动一切
#2
46
I was getting this same error and fixed it using:
我得到了同样的错误,并使用以下方法修复它:
bundle update jquery-rails
捆绑更新jquery-rails
In looking into it, it appears that jquery-rails 2.0.0 was yanked from rubygems: http://d.pr/i/cLms/1ReBI4U8 for whatever reason. So you (and I) likely happened to install jquery-rails when that gem was the most current version.
在调查中,似乎jquery-rails 2.0.0从rubygems中被拉出来:http://d.pr/i/cLms/1ReBI4U8无论出于何种原因。因此,当宝石是最新版本时,您(和我)可能碰巧安装了jquery-rails。
It's also wise to note that deleting your Gemfile.lock
can be dangerous and not recommended in most cases. This causes all the latest versions of every gem without a version number in your Gemfile to be downloaded. If gems have been updated with API-breaking changes (happens more often than you might think), your app could break. But it also might not. Just be careful, run test cases if you have them. This has caused me more than one headache.
同样明智的是,删除Gemfile.lock可能很危险,在大多数情况下不推荐使用。这会导致下载Gemfile中没有版本号的每个gem的所有最新版本。如果宝石已经更新了API破坏性更改(比您想象的更频繁发生),您的应用程序可能会中断。但它也可能没有。请小心,如果有的话运行测试用例。这引起了我不止一次的头痛。
You can read a bit more about how bundler, Gemfile, and Gemfile.lock work (as well as guidance on how to properly upgrade certain gems) here: http://viget.com/extend/bundler-best-practices
您可以在此处阅读有关bundler,Gemfile和Gemfile.lock如何工作的更多信息(以及如何正确升级某些gem的指导):http://viget.com/extend/bundler-best-practices
#3
2
Update: I am going through mhartl's Rails Tutorials and had to update jquery-rails, '2.0.1' in the Gemfile, to get the bundle update jquery-rails going.
更新:我正在浏览mhartl的Rails教程,并且必须在Gemfile中更新jquery-rails,'2.0.1',以获得更新jquery-rails的包。
Thanks, Jatin
谢谢,贾丁
#4
1
i had similar issue by changing in Gemfile jquery-rails-2.0.0 to 2.0.1 will solved my problem.
我有类似的问题,通过更改Gemfile jquery-rails-2.0.0到2.0.1将解决我的问题。
#5
0
Michael,
迈克尔,
I had to remove the version number from my jquery gem from 2.0.0 and let it pull the latest for this to work. I am on rails 3.2.8.rc2 and running on the cedar stack of heroku. Best of luck!
我不得不从我的jquery gem中删除2.0.0中的版本号,然后让它拉出最新版本来实现。我在rails 3.2.8.rc2上运行并在heroku的雪松堆栈上运行。祝你好运!
Mark
标记
#1
13
Worked for me:
为我工作:
- delete the Gemfile.lock
- 删除Gemfile.lock
- removed the rails version from the line => gem 'rails' (jquery was already without a v number)
- 从line => gem'trail'中删除了rails版本(jquery已经没有v号)
- run the command "bundle install"
- 运行命令“bundle install”
- run also "bundle update jquery-rails" to make sure everything is updated
- 运行“捆绑更新jquery-rails”以确保一切都更新
- IMPORTANT, commit the new .lock file => run the "git add ." and "git commit ..."
- 重要的是,提交新的.lock文件=>运行“git add”。和“git commit ...”
- push everything
- 推动一切
#2
46
I was getting this same error and fixed it using:
我得到了同样的错误,并使用以下方法修复它:
bundle update jquery-rails
捆绑更新jquery-rails
In looking into it, it appears that jquery-rails 2.0.0 was yanked from rubygems: http://d.pr/i/cLms/1ReBI4U8 for whatever reason. So you (and I) likely happened to install jquery-rails when that gem was the most current version.
在调查中,似乎jquery-rails 2.0.0从rubygems中被拉出来:http://d.pr/i/cLms/1ReBI4U8无论出于何种原因。因此,当宝石是最新版本时,您(和我)可能碰巧安装了jquery-rails。
It's also wise to note that deleting your Gemfile.lock
can be dangerous and not recommended in most cases. This causes all the latest versions of every gem without a version number in your Gemfile to be downloaded. If gems have been updated with API-breaking changes (happens more often than you might think), your app could break. But it also might not. Just be careful, run test cases if you have them. This has caused me more than one headache.
同样明智的是,删除Gemfile.lock可能很危险,在大多数情况下不推荐使用。这会导致下载Gemfile中没有版本号的每个gem的所有最新版本。如果宝石已经更新了API破坏性更改(比您想象的更频繁发生),您的应用程序可能会中断。但它也可能没有。请小心,如果有的话运行测试用例。这引起了我不止一次的头痛。
You can read a bit more about how bundler, Gemfile, and Gemfile.lock work (as well as guidance on how to properly upgrade certain gems) here: http://viget.com/extend/bundler-best-practices
您可以在此处阅读有关bundler,Gemfile和Gemfile.lock如何工作的更多信息(以及如何正确升级某些gem的指导):http://viget.com/extend/bundler-best-practices
#3
2
Update: I am going through mhartl's Rails Tutorials and had to update jquery-rails, '2.0.1' in the Gemfile, to get the bundle update jquery-rails going.
更新:我正在浏览mhartl的Rails教程,并且必须在Gemfile中更新jquery-rails,'2.0.1',以获得更新jquery-rails的包。
Thanks, Jatin
谢谢,贾丁
#4
1
i had similar issue by changing in Gemfile jquery-rails-2.0.0 to 2.0.1 will solved my problem.
我有类似的问题,通过更改Gemfile jquery-rails-2.0.0到2.0.1将解决我的问题。
#5
0
Michael,
迈克尔,
I had to remove the version number from my jquery gem from 2.0.0 and let it pull the latest for this to work. I am on rails 3.2.8.rc2 and running on the cedar stack of heroku. Best of luck!
我不得不从我的jquery gem中删除2.0.0中的版本号,然后让它拉出最新版本来实现。我在rails 3.2.8.rc2上运行并在heroku的雪松堆栈上运行。祝你好运!
Mark
标记