heroku - 部署 Rails 3.1.rc4 时 sprockets 的问题

标签 heroku bundler ruby-on-rails-3.1 sprockets asset-pipeline

我敢肯定,我只是在这里忽略了一些简单的事情,但这让我整晚都发疯了!当尝试将 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

四处寻找,找到this article在 Google 网上论坛上,我确定这必须通过添加这一行来解决
gem 'sprockets', '2.0.0.beta10'

到我的 Gemfile 然后运行
bundle update sprockets

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

在这一点上,我不知道该怎么做或如何处理。我是否可能需要升级到 Rails 3.1.rc5,如果需要,我该如何做到这一点而无需从头开始?

感谢您提供的任何帮助!

-罗伯特

最佳答案

只需将您的 Rails 版本提高到 rc5

gem 'rails', '3.1.0rc5'

然后:
bundle update

关于heroku - 部署 Rails 3.1.rc4 时 sprockets 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7054726/

相关文章:

express - GET请求返回html而不是对象,返回的路由无法进入Heroku服务器

ruby-on-rails - 如何在 Rails 3.1 中管理 CSS 样式表资源?

ruby-on-rails-3.1 - 将 Google+ 与 Rails 集成

ruby-on-rails-3.1 - 载波-Rails 3.1-未定义的方法:image_will_change

node.js - 在 Heroku 中显示 Probot 日志

heroku - 如何将 Heroku 插件从一个应用程序移动到另一个应用程序

python - 错误 R10(启动超时)Heroku 使用 python 脚本

ruby-on-rails - rails 'Bundle Install' 不工作

ruby - bundle install --without <group> with private git repository

ruby - 如何配置 Bundler/Gemfile 以在开发期间使用不同的 gem 源?