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

时间:2011-08-14 03:00:33

标签: 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

My 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后,我确定必须通过添加此行来修复此问题

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,如果是这样的话,如果不从头开始,我怎么能这样做呢?

感谢您提供任何帮助!

-Robert

1 个答案:

答案 0 :(得分:5)

只需将你的导轨版本提升至rc5

gem 'rails', '3.1.0rc5'

然后:

bundle update