首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在任何源中找不到机架缓存错误

在任何源中找不到机架缓存错误
EN

Stack Overflow用户
提问于 2011-09-28 12:43:54
回答 2查看 4.5K关注 0票数 0

我是创建rails应用程序的新手。我正在研究这个tutorial,并在启动rails服务器时遇到了这个问题。当我执行命令(rails server或bundle exec rails server)时,我得到以下错误:

代码语言:javascript
复制
←[31mCould not find rack-cache-1.0.3 in any of the sources←[0m
←[33mRun `bundle install` to install missing gems.←[0m

我不确定为什么会发生这种情况,因为安装了机架缓存。我已经运行了bundle install,但这并不能修复任何问题。

这是我的gemfile

代码语言:javascript
复制
source 'http://rubygems.org'

gem 'rails', '3.1.0'

# Bundle edge Rails instead:
# gem 'rails',     :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'

gem 'json'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails', "  ~> 3.1.0"
  gem 'coffee-rails', "~> 3.1.0"
  gem 'uglifier'
end

gem 'jquery-rails'

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug'

我的宝石清单是:

代码语言:javascript
复制
abstract (1.0.0)
actionmailer (3.1.0, 3.0.0)
actionpack (3.1.0, 3.0.0)
activemodel (3.1.0, 3.0.0)
activerecord (3.1.0, 3.0.0)
activeresource (3.1.0, 3.0.0)
activesupport (3.1.0, 3.0.9, 3.0.0)
arel (2.2.1, 1.0.1)
bcrypt-ruby (3.0.1 x86-mingw32)
builder (3.0.0, 2.1.2)
bundler (1.0.18)
childprocess (0.2.2)
coffee-rails (3.1.1)
coffee-script (2.2.0)
coffee-script-source (1.1.2)
commonwatir (2.0.2, 1.9.2)
diff-lcs (1.1.2)
erubis (2.7.0, 2.6.6)
execjs (1.2.9)
ffi (1.0.9 x86-mingw32)
firewatir (1.9.4, 1.9.2)
hike (1.2.1)
hoe (2.10.0)
i18n (0.6.0, 0.4.2)
jquery-rails (1.0.14)
mail (2.3.0, 2.2.19)
metaclass (0.0.1)
mime-types (1.16)
mocha (0.9.12)
multi_json (1.0.3)
nokogiri (1.5.0 x86-mingw32)
polyglot (0.3.2)
rack (1.3.3, 1.2.4)
rack-cache (1.1)
rack-mount (0.8.3, 0.6.14)
rack-ssl (1.3.2)
rack-test (0.6.1, 0.5.7)
rails (3.1.0, 3.0.0)
railties (3.1.0, 3.0.0)
rake (0.9.2)
rautomation (0.6.3)
rdoc (3.9.4)
rspec (2.6.0)
rspec-core (2.6.4)
rspec-expectations (2.6.0)
rspec-mocks (2.6.0)
rubigen (1.5.6)
rubyzip (0.9.4)
s4t-utils (1.0.4)
sass (3.1.7)
sass-rails (3.1.2)
selenium-webdriver (2.6.0)
sprockets (2.0.0)
sqlite3 (1.3.4 x86-mingw32)
taglob (1.1.2)
taza (0.8.7)
term-ansicolor (1.0.6)
thor (0.14.6)
treetop (1.4.10)
tzinfo (0.3.29)
uglifier (1.0.3)
user-choices (1.1.6.1)
watir (2.0.2, 1.9.2)
watir-webdriver (0.3.3)
win32-api (1.4.8 x86-mingw32)
win32-process (0.6.5)
win32console (1.3.0 x86-mingw32)
windows-api (0.4.0)
windows-pr (1.2.0)
xml-simple (1.1.0)
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2012-01-13 11:50:58

确保您没有得到以下任何信息: /var/lib/gems/1.8/specifications/rack-cache-1.0.3.gemspec:格式的gemspec无效,规范中的日期格式无效:"2011-08-27 00:00:00.000000000Z“

如果是,请编辑gemspec文件并将日期更改为"2011-08-27“,删除00:00:00.000000000Z

这对于所有的gem都是一样的,不仅仅是机架缓存。

票数 1
EN

Stack Overflow用户

发布于 2011-09-28 13:05:27

看起来机架缓存1.1正在加载,但Rails正在寻找1.0.3。由于您的Gemfile.lock列表丢失了缩进,因此不清楚哪个gem需要它,但是您可以尝试将gem 'rack-cache', '1.0.3'gem 'rack-cache', '~> 1.0.3'放在Gemfile的顶部(在gem 'rails'之后)。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7578405

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档