Bundle Install not working?



我正在一个rails项目上工作,当我试图运行回形针迁移生成器时,一直得到这个错误。它告诉我bundle install,因为找不到gems源,但是当我运行bundle install时,一切都很好,除了每次运行bundle update时都得到相同的错误信息。

我在几个小时前遇到了同样的问题,但是这次它找不到json gem -v 1.8.1的源代码。

为了解决这个问题,我运行了gem install json -v 1.8.1,之后一切顺利。现在,这个问题又出现在另一个gem上,并且运行gem install来安装这个gem似乎没有效果。

我一直得到的错误:

Could not find climate_control-0.0.3 in any of the sources Run bundle install to install missing gems.

Gemfile:

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.1'
# Use postgresql as the database for Active Record
gem 'pg'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer',  platforms: :ruby
# Authentication gems
gem 'sorcery'
gem 'bcrypt'
# Photo Upload
gem 'paperclip', '~> 4.1'
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'rabl'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0',          group: :doc
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
group :development do
  gem 'spring'
  gem 'pry'
end

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]

当我运行bundle install时,它也显示它使用了正确的气候控制,但没有运气出现错误。

Using climate_control 0.0.3

也值得注意的是,我最近下载了rvm并升级到ruby -v 2.1.1,不知道这是否与它有任何关系,但值得让你知道。

谢谢你的帮助。

对我来说有效的是从gemfile中删除Spring(由于某种原因它与回形针冲突)

我在这里提交了一个关于回形针回购的问题:https://github.com/thoughtbot/paperclip/issues/2226

我不知道为什么会发生这种情况,但是用户上传文件比开发人员的舒适度更重要,所以再见,春天。

如果我找到发生这种情况的确切原因,我会更新答案。

您是否使用ruby管理器?

你可能有不止一颗红宝石。

也尝试使用gem update——system.

更新你的rubygems。