Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 捆绑安装不起作用?_Ruby On Rails_Ruby - Fatal编程技术网

Ruby on rails 捆绑安装不起作用?

Ruby on rails 捆绑安装不起作用?,ruby-on-rails,ruby,Ruby On Rails,Ruby,我正在从事一个rails项目,当我尝试运行回形针迁移生成器时,不断出现此错误。它告诉我捆绑安装,因为找不到gems源代码,但是当我运行bundle安装时,一切都很顺利,只是每次运行bundle更新时都会收到相同的错误消息 几小时前我也遇到了同样的问题,但是这次它找不到json gem-V1.8.1的源代码 为了解决这个问题,我运行了gem install json-v1.8.1,之后一切正常。现在问题又出现在另一个gem上,这次为gem运行gem安装似乎没有效果 我一直得到的错误是: 在任何源中

我正在从事一个rails项目,当我尝试运行回形针迁移生成器时,不断出现此错误。它告诉我捆绑安装,因为找不到gems源代码,但是当我运行bundle安装时,一切都很顺利,只是每次运行bundle更新时都会收到相同的错误消息

几小时前我也遇到了同样的问题,但是这次它找不到json gem-V1.8.1的源代码

为了解决这个问题,我运行了
gem install json-v1.8.1
,之后一切正常。现在问题又出现在另一个gem上,这次为gem运行gem安装似乎没有效果

我一直得到的错误是:

在任何源中都找不到气候控制-0.0.3
运行bundle install以安装缺少的gems。

档案:

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时,它还显示它使用了正确的气候控制,但没有发现错误

使用气候控制0.0.3

另外值得注意的是,我最近下载了rvm并升级到ruby-V2.1.1,不知道这是否与此有关,但值得让您知道


谢谢你的帮助

您使用的是ruby管理器吗

你可能有不止一颗红宝石


同时尝试用gem update--system更新你的rubygems。

对我有效的方法是从gem文件中删除Spring(由于某些原因,它与回形针冲突)

我在这里提交了一份关于回形针回购的文件:

我不知道为什么会发生这种情况,但用户上传文件比开发人员更重要,所以再见spring


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

尝试删除您的
Gemfile.lock
,然后运行
bundle install
,查看是否所有内容都已为您排序。是否完全删除Gemfile.lock?像rm-rf?不需要
-rf
参数。只需执行
rm Gemfile.lock
bundle install
@kiddorails删除和重试无效,仍在运行bundle install climate control no source等。请显示您的Gemfile。你有回形针,对吗?你的Gemfile中没有必要有气候控制,因为可卡因依赖于回形针,气候控制依赖于可卡因。您应该能够在Gemfile.lock中看到这些依赖项。我正在使用rvm,我有一个ruby,但是您的解决方案“gem update--system”适合我。谢谢