部署 Rails 3.1.rc4 时链轮出现问题

发布于 2024-11-29 14:28:11 字数 1602 浏览 3 评论 0原文

我确信我只是忽略了这里的一些简单的东西,但这让我整个晚上都发疯了!当尝试将 Rails 3.1.rc4 应用程序部署到 Heroku 上的 Cedar 堆栈时(一个月前我使用类似的 Gemfile 成功完成了此操作),我收到此错误:

Could not find sprockets-2.0.0.beta.10 in any of the sources

我的 Gemfile 如下所示:

source 'http://rubygems.org'

# Core
gem 'rails', '3.1.0.rc4'

# Asset template engines
gem 'sass-rails', "~> 3.1.0.rc"
gem 'coffee-script'
gem 'uglifier'

# Misc
gem 'devise'
gem 'jquery-rails'
gem 'omniauth'
gem 'fb_graph'
gem 'compass', git: 'https://github.com/chriseppstein/compass.git', branch: 'rails31'
gem 'haml'
gem 'cancan'
gem 'kaminari'
gem 'friendly_id', '~> 3.3.0', git: 'https://github.com/norman/friendly_id.git'
gem 'recaptcha', :require => 'recaptcha/rails'
gem 'aws-ses', '~> 0.4.3', :require => 'aws/ses'

# Local Environment
group :test do
  # Pretty printed test output
  gem 'turn', :require => false
    gem 'sqlite3'
end

# Heroku Environment
group :production do
    gem 'pg'
    gem 'execjs'
    gem 'therubyracer'
end

在搜索并找到 这篇文章在 Google 网上论坛上,我确定必须通过将此行添加

gem 'sprockets', '2.0.0.beta10'

到我的 Gemfile 中然后运行

bundle update sprockets

​​This failed

Could not find gem 'sprockets (= 2.0.0.beta10, runtime)' in any of the gem sources listed in your Gemfile.

来修复此问题,此时我不知道该怎么做或如何处理此问题。我是否需要升级到 Rails 3.1.rc5,如果是的话,我该如何做到这一点而不需要从头开始?

感谢您提供的任何帮助!

——罗伯特

I'm sure that I am just overlooking something simple here but this has been driving me crazy all night! When trying to deploy a Rails 3.1.rc4 application to the Cedar stack on Heroku (I did this successfully a month ago with a similar Gemfile) I am receiving this error:

Could not find sprockets-2.0.0.beta.10 in any of the sources

My Gemfile looks like this:

source 'http://rubygems.org'

# Core
gem 'rails', '3.1.0.rc4'

# Asset template engines
gem 'sass-rails', "~> 3.1.0.rc"
gem 'coffee-script'
gem 'uglifier'

# Misc
gem 'devise'
gem 'jquery-rails'
gem 'omniauth'
gem 'fb_graph'
gem 'compass', git: 'https://github.com/chriseppstein/compass.git', branch: 'rails31'
gem 'haml'
gem 'cancan'
gem 'kaminari'
gem 'friendly_id', '~> 3.3.0', git: 'https://github.com/norman/friendly_id.git'
gem 'recaptcha', :require => 'recaptcha/rails'
gem 'aws-ses', '~> 0.4.3', :require => 'aws/ses'

# Local Environment
group :test do
  # Pretty printed test output
  gem 'turn', :require => false
    gem 'sqlite3'
end

# Heroku Environment
group :production do
    gem 'pg'
    gem 'execjs'
    gem 'therubyracer'
end

After searching around and finding this article on Google Groups, I determined that this must be fixable by adding this line

gem 'sprockets', '2.0.0.beta10'

to my Gemfile and then running

bundle update sprockets

This failed with

Could not find gem 'sprockets (= 2.0.0.beta10, runtime)' in any of the gem sources listed in your Gemfile.

and at this point I don't know what to do or how to handle this. Is it possible that I need to upgrade to Rails 3.1.rc5 and if so how may I do that without starting over from scratch?

Thank you for any help that you can provide!

-Robert

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

纸短情长 2024-12-06 14:28:11

只需将你的 Rails 版本升级到 rc5

gem 'rails', '3.1.0rc5'

即可:

bundle update

Just bump your rails version up to rc5

gem 'rails', '3.1.0rc5'

then:

bundle update
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文