ruby-on-rails – 在任何来源中都找不到gem mime-types-2.4.1

我发现有十几个人试图解决同样的问题,但没有一个人有答案,也没有人跟随这个话题.

Could not find mime-types-1.25.1 in any of the sources (Bundler::GemNotFound)

Could not find mime-types-1.23 in any of the sources

Could not find mime-types-1.25.1 in any of the sources (Bundler::GemNotFound)

阅读完这些主题后,我将回答人们提出的问题:

目标是升级到Rails 4.

的Gemfile:

source 'http://rubygems.org'

gem 'rails', '~>4.1.6'
gem 'nokogiri'
gem 'pg'
gem "devise", "~> 3.3.0"      # Authentication
gem "squeel", "~> 1.2.1"      # Smarter (Arel) query syntax
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'i18n', '~> 0.6.9'

gem "rails_admin", "~> 0.6.3" # CMS Backend
gem "cancan", "~> 1.6.8"      # Authorization
gem 'ckeditor', '~>4.0.10'
gem 'paper_trail', '~> 3.0.5'

gem 'mime-types', '~> 2.4.1'


# # Image upload with dragonfly
gem 'rack-cache', :require => 'rack/cache'
gem 'dragonfly', '~>0.9.14'

# # All things related with the API bridge
gem "faraday", "~> 0.8.1"
gem "faraday_middleware", "~> 0.8.8"
gem "hashie"

gem "geocoder"

gem "thin"

gem "html_truncator", "~>0.2"

gem 'email_validator', :require => 'email_validator/strict'

# # [formtastic](http://github.com/justinfrench/formtastic/tree/master)
gem 'formtastic', '~> 2.2.1'

# # Rails I18n: de-facto standard library for ActiveRecord 3 model/data t...
# # [globalize3](http://github.com/svenfuchs/globalize3)
# #
# # Using a sha because they've fixed a few things with empty translations etc., the next version
# # after 0.3.0 should be used again.
gem 'globalize', '~> 4.0.2'

# # ## Error tracking
# #
# # Send your application errors to our hosted service and reclaim your i...
# # [airbrake](http://www.airbrake.io)
gem 'airbrake', '~> 3.2.1'

# # Ruby wrapper for the LinkedIn API
# # [linkedin](http://github.com/pengwynn/linkedin)
# # Using a fork because permissions were not passed through right in the gem.
# # See [here](https://github.com/pengwynn/linkedin/pull/137) for more info.
# # gem 'linkedin', :git => "https://github.com/rajeshucsb/linkedin.git", :ref => "44d6bbed231d9fc8fcf0a1cba6eab6badb16f007"
gem "linkedin"

# # Openminds Server Gems
# gem 'openminds_deploy'
gem 'newrelic_rpm', '~> 3.9.1.236'

# #Curl - download over HTTP
gem "curb", "~> 0.8.4"

# #Whenever - cron job
gem 'whenever', '~> 0.9.2', :require => false

# # Used by the status app
gem 'sqlite3'
gem "sequel"
gem 'sinatra'

# Protect attributes
gem 'protected_attributes'

# # Pry
# # gem 'byebug', '~> 3.5.1'
# gem 'pry'
# gem 'pry-remote'
# gem 'pry-stack_explorer'
# gem 'pry-byebug'
# gem "pry-rails", "~> 0.1.6"

# # Zurb
gem 'compass-rails' # you need this or you get an err
gem "zurb-foundation", "~> 4.0.0"

# # Advanced logging
gem 'le'

# # Sitemap
gem 'sitemap_generator'

# # Former Assets groups
gem 'sass', '~> 3.2.0'
gem 'sass-rails',   '~> 4.0.3'
gem 'coffee-rails', '~> 4.0.1'
gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 2.5.3'

group :development, :test do
    gem 'bullet'

    gem "factory_girl_rails", "~> 3.5.0"
    gem "awesome_print", "~> 1.1.0"
    gem 'sextant'      # `/rails/routes`
    gem 'quiet_assets' # Quiet those assets!

    #   # Deploying
    #   # Really fast deployer and server automation tool.
    #   # [mina](http://github.com/nadarei/mina)
    gem "mina", "~> 0.3.0"

    #   # Used by the dummy app:
    gem 'foreman'
end

group :test do
    gem 'shoulda-context'
    gem 'webmock', '~>1.8.8'

    gem 'mocha', '~> 1.0.0'
end

Gemfile.lock的

GEM
  remote: http://rubygems.org/
  specs:
    actionmailer (4.1.6)
      actionpack (= 4.1.6)
      actionview (= 4.1.6)
      mail (~> 2.5, >= 2.5.4)
    actionpack (4.1.6)
      actionview (= 4.1.6)
      activesupport (= 4.1.6)
      rack (~> 1.5.2)
      rack-test (~> 0.6.2)
    actionview (4.1.6)
      activesupport (= 4.1.6)
      builder (~> 3.1)
      erubis (~> 2.7.0)
    activemodel (4.1.6)
      activesupport (= 4.1.6)
      builder (~> 3.1)
    activerecord (4.1.6)
      activemodel (= 4.1.6)
      activesupport (= 4.1.6)
      arel (~> 5.0.0)
    activesupport (4.1.6)
      i18n (~> 0.6, >= 0.6.9)
      json (~> 1.7, >= 1.7.7)
      minitest (~> 5.1)
      thread_safe (~> 0.1)
      tzinfo (~> 1.1)
    addressable (2.3.6)
    airbrake (3.2.1)
      builder
      multi_json
    arel (5.0.1.20140414130214)
    awesome_print (1.1.0)
    bcrypt (3.1.7)
    builder (3.2.2)
    bullet (4.14.0)
      activesupport (>= 3.0.0)
      uniform_notifier (>= 1.6.0)
    cancan (1.6.10)
    chronic (0.10.2)
    chunky_png (1.3.1)
    ckeditor (4.0.11)
      mime-types
      orm_adapter (~> 0.5.0)
    coffee-rails (4.0.1)
      coffee-script (>= 2.2.0)
      railties (>= 4.0.0, < 5.0)
    coffee-script (2.3.0)
      coffee-script-source
      execjs
    coffee-script-source (1.8.0)
    compass (0.12.7)
      chunky_png (~> 1.2)
      fssm (>= 0.2.7)
      sass (~> 3.2.19)
    compass-rails (2.0.0)
      compass (>= 0.12.2)
    crack (0.4.2)
      safe_yaml (~> 1.0.0)
    curb (0.8.6)
    daemons (1.1.9)
    devise (3.3.0)
      bcrypt (~> 3.0)
      orm_adapter (~> 0.1)
      railties (>= 3.2.6, < 5)
      thread_safe (~> 0.1)
      warden (~> 1.2.3)
    dotenv (0.11.1)
      dotenv-deployment (~> 0.0.2)
    dotenv-deployment (0.0.2)
    dragonfly (0.9.15)
      multi_json (~> 1.0)
      rack
    email_validator (1.4.0)
      activemodel
    erubis (2.7.0)
    eventmachine (1.0.3)
    execjs (2.2.1)
    factory_girl (3.5.0)
      activesupport (>= 3.0.0)
    factory_girl_rails (3.5.0)
      factory_girl (~> 3.5.0)
      railties (>= 3.0.0)
    faraday (0.8.9)
      multipart-post (~> 1.2.0)
    faraday_middleware (0.8.8)
      faraday (>= 0.7.4, < 0.9)
    font-awesome-rails (4.2.0.0)
      railties (>= 3.2, < 5.0)
    foreman (0.75.0)
      dotenv (~> 0.11.1)
      thor (~> 0.19.1)
    formtastic (2.2.1)
      actionpack (>= 3.0)
    fssm (0.2.10)
    geocoder (1.2.5)
    globalize (4.0.2)
      activemodel (>= 4.0.0, < 5)
      activerecord (>= 4.0.0, < 5)
    haml (4.0.5)
      tilt
    hashie (3.3.1)
    hike (1.2.3)
    html_truncator (0.4.0)
      nokogiri (~> 1.5)
    i18n (0.6.11)
    jquery-rails (3.1.2)
      railties (>= 3.0, < 5.0)
      thor (>= 0.14, < 2.0)
    jquery-ui-rails (4.2.1)
      railties (>= 3.2.16)
    json (1.8.1)
    kaminari (0.16.1)
      actionpack (>= 3.0.0)
      activesupport (>= 3.0.0)
    le (2.4.0)
    libv8 (3.16.14.7)
    linkedin (1.0.0)
      hashie (~> 3.0)
      multi_json (~> 1.0)
      oauth (~> 0.4)
    mail (2.6.1)
      mime-types (>= 1.16, < 3)
    metaclass (0.0.4)
    mime-types (2.4.1)
    mina (0.3.0)
      open4
      rake
    mini_portile (0.6.0)
    minitest (5.4.2)
    mocha (1.0.0)
      metaclass (~> 0.0.1)
    multi_json (1.10.1)
    multipart-post (1.2.0)
    nested_form (0.3.2)
    newrelic_rpm (3.9.1.236)
    nokogiri (1.6.3.1)
      mini_portile (= 0.6.0)
    oauth (0.4.7)
    open4 (1.3.4)
    orm_adapter (0.5.0)
    paper_trail (3.0.5)
      activerecord (>= 3.0, < 5.0)
      activesupport (>= 3.0, < 5.0)
    pg (0.17.1)
    polyamorous (1.1.0)
      activerecord (>= 3.0)
    protected_attributes (1.0.8)
      activemodel (>= 4.0.1, < 5.0)
    quiet_assets (1.0.3)
      railties (>= 3.1, < 5.0)
    rack (1.5.2)
    rack-cache (1.2)
      rack (>= 0.4)
    rack-pjax (0.8.0)
      nokogiri (~> 1.5)
      rack (~> 1.1)
    rack-protection (1.5.3)
      rack
    rack-test (0.6.2)
      rack (>= 1.0)
    rails (4.1.6)
      actionmailer (= 4.1.6)
      actionpack (= 4.1.6)
      actionview (= 4.1.6)
      activemodel (= 4.1.6)
      activerecord (= 4.1.6)
      activesupport (= 4.1.6)
      bundler (>= 1.3.0, < 2.0)
      railties (= 4.1.6)
      sprockets-rails (~> 2.0)
    rails_admin (0.6.3)
      builder (~> 3.1)
      coffee-rails (~> 4.0)
      font-awesome-rails (>= 3.0)
      haml (~> 4.0)
      jquery-rails (~> 3.0)
      jquery-ui-rails (~> 4.0)
      kaminari (~> 0.14)
      nested_form (~> 0.3)
      rack-pjax (~> 0.7)
      rails (~> 4.0)
      remotipart (~> 1.0)
      safe_yaml (~> 1.0)
      sass-rails (~> 4.0)
    railties (4.1.6)
      actionpack (= 4.1.6)
      activesupport (= 4.1.6)
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rake (10.3.2)
    ref (1.0.5)
    remotipart (1.2.1)
    safe_yaml (1.0.4)
    sass (3.2.19)
    sass-rails (4.0.3)
      railties (>= 4.0.0, < 5.0)
      sass (~> 3.2.0)
      sprockets (~> 2.8, <= 2.11.0)
      sprockets-rails (~> 2.0)
    sequel (4.15.0)
    sextant (0.2.4)
      rails (>= 3.2)
    shoulda-context (1.2.1)
    sinatra (1.4.5)
      rack (~> 1.4)
      rack-protection (~> 1.4)
      tilt (~> 1.3, >= 1.3.4)
    sitemap_generator (5.0.5)
      builder
    sprockets (2.11.0)
      hike (~> 1.2)
      multi_json (~> 1.0)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    sprockets-rails (2.1.4)
      actionpack (>= 3.0)
      activesupport (>= 3.0)
      sprockets (~> 2.8)
    sqlite3 (1.3.9)
    squeel (1.2.1)
      activerecord (>= 3.0)
      activesupport (>= 3.0)
      polyamorous (~> 1.1.0)
    therubyracer (0.12.1)
      libv8 (~> 3.16.14.0)
      ref
    thin (1.6.3)
      daemons (~> 1.0, >= 1.0.9)
      eventmachine (~> 1.0)
      rack (~> 1.0)
    thor (0.19.1)
    thread_safe (0.3.4)
    tilt (1.4.1)
    tzinfo (1.2.2)
      thread_safe (~> 0.1)
    uglifier (2.5.3)
      execjs (>= 0.3.0)
      json (>= 1.8.0)
    uniform_notifier (1.6.2)
    warden (1.2.3)
      rack (>= 1.0)
    webmock (1.8.11)
      addressable (>= 2.2.7)
      crack (>= 0.1.7)
    whenever (0.9.3)
      chronic (>= 0.6.3)
    zurb-foundation (4.0.9)
      sass (>= 3.2.0)

PLATFORMS
  ruby

DEPENDENCIES
  airbrake (~> 3.2.1)
  awesome_print (~> 1.1.0)
  bullet
  cancan (~> 1.6.8)
  ckeditor (~> 4.0.10)
  coffee-rails (~> 4.0.1)
  compass-rails
  curb (~> 0.8.4)
  devise (~> 3.3.0)
  dragonfly (~> 0.9.14)
  email_validator
  factory_girl_rails (~> 3.5.0)
  faraday (~> 0.8.1)
  faraday_middleware (~> 0.8.8)
  foreman
  formtastic (~> 2.2.1)
  geocoder
  globalize (~> 4.0.2)
  hashie
  html_truncator (~> 0.2)
  i18n (~> 0.6.9)
  jquery-rails
  jquery-ui-rails
  le
  linkedin
  mime-types (~> 2.4.1)
  mina (~> 0.3.0)
  mocha (~> 1.0.0)
  newrelic_rpm (~> 3.9.1.236)
  nokogiri
  paper_trail (~> 3.0.5)
  pg
  protected_attributes
  quiet_assets
  rack-cache
  rails (~> 4.1.6)
  rails_admin (~> 0.6.3)
  sass (~> 3.2.0)
  sass-rails (~> 4.0.3)
  sequel
  sextant
  shoulda-context
  sinatra
  sitemap_generator
  sqlite3
  squeel (~> 1.2.1)
  therubyracer
  thin
  uglifier (>= 2.5.3)
  webmock (~> 1.8.8)
  whenever (~> 0.9.2)
  zurb-foundation (~> 4.0.0)

捆绑清单

Gems included by the bundle:
  * actionmailer (4.1.6)
  * actionpack (4.1.6)
  * actionview (4.1.6)
  * activemodel (4.1.6)
  * activerecord (4.1.6)
  * activesupport (4.1.6)
  * airbrake (3.2.1)
  * arel (5.0.1.20140414130214)
  * bcrypt (3.1.7)
  * builder (3.2.2)
  * bundler (1.7.3)
  * cancan (1.6.10)
  * chronic (0.10.2)
  * chunky_png (1.3.1)
  * ckeditor (4.0.11)
  * coffee-rails (4.0.1)
  * coffee-script (2.3.0)
  * coffee-script-source (1.8.0)
  * compass (0.12.7)
  * compass-rails (2.0.0)
  * curb (0.8.6)
  * daemons (1.1.9)
  * devise (3.3.0)
  * dragonfly (0.9.15)
  * email_validator (1.4.0)
  * erubis (2.7.0)
  * eventmachine (1.0.3)
  * execjs (2.2.1)
  * faraday (0.8.9)
  * faraday_middleware (0.8.8)
  * font-awesome-rails (4.2.0.0)
  * formtastic (2.2.1)
  * fssm (0.2.10)
  * geocoder (1.2.5)
  * globalize (4.0.2)
  * haml (4.0.5)
  * hashie (3.3.1)
  * hike (1.2.3)
  * html_truncator (0.4.0)
  * i18n (0.6.11)
  * jquery-rails (3.1.2)
  * jquery-ui-rails (4.2.1)
  * json (1.8.1)
  * kaminari (0.16.1)
  * le (2.4.0)
  * libv8 (3.16.14.7)
  * linkedin (1.0.0)
  * mail (2.6.1)
  * mime-types (2.4.1)
  * mini_portile (0.6.0)
  * minitest (5.4.2)
  * multi_json (1.10.1)
  * multipart-post (1.2.0)
  * nested_form (0.3.2)
  * newrelic_rpm (3.9.1.236)
  * nokogiri (1.6.3.1)
  * oauth (0.4.7)
  * orm_adapter (0.5.0)
  * paper_trail (3.0.5)
  * pg (0.17.1)
  * polyamorous (1.1.0)
  * protected_attributes (1.0.8)
  * rack (1.5.2)
  * rack-cache (1.2)
  * rack-pjax (0.8.0)
  * rack-protection (1.5.3)
  * rack-test (0.6.2)
  * rails (4.1.6)
  * rails_admin (0.6.3)
  * railties (4.1.6)
  * rake (10.3.2)
  * ref (1.0.5)
  * remotipart (1.2.1)
  * safe_yaml (1.0.4)
  * sass (3.2.19)
  * sass-rails (4.0.3)
  * sequel (4.15.0)
  * sinatra (1.4.5)
  * sitemap_generator (5.0.5)
  * sprockets (2.11.0)
  * sprockets-rails (2.1.4)
  * sqlite3 (1.3.9)
  * squeel (1.2.1)
  * therubyracer (0.12.1)
  * thin (1.6.3)
  * thor (0.19.1)
  * thread_safe (0.3.4)
  * tilt (1.4.1)
  * tzinfo (1.2.2)
  * uglifier (2.5.3)
  * warden (1.2.3)
  * whenever (0.9.3)
  * zurb-foundation (4.0.9)

版本信息:
捆绑-v:

Bundler版本1.7.3

宝石-v:

2.2.2

Ruby -v:

ruby 2.1.3p242(2014-09-19修订版47630)[x86_64-darwin13.0]

编辑1)

.bundle /配置

---
BUNDLE_PATH: vendor
BUNDLE_DISABLE_SHARED_GEMS: '1'
BUNDLE_JOBS: 4
BUNDLE_WITHOUT: test:development

完成错误:

Bundler::GemNotFound: Could not find mime-types-2.4.1 in any of the sources
~/.rvm/gems/ruby-1.9.3-p547@global/gems/bundler-1.7.2/lib/bundler/spec_set.rb:92:in `block in materialize'
~/.rvm/gems/ruby-1.9.3-p547@global/gems/bundler-1.7.2/lib/bundler/spec_set.rb:85:in `map!'
~/.rvm/gems/ruby-1.9.3-p547@global/gems/bundler-1.7.2/lib/bundler/spec_set.rb:85:in `materialize'
~/.rvm/gems/ruby-1.9.3-p547@global/gems/bundler-1.7.2/lib/bundler/definition.rb:132:in `specs'
~/.rvm/gems/ruby-1.9.3-p547@global/gems/bundler-1.7.2/lib/bundler/definition.rb:177:in `specs_for'
~/.rvm/gems/ruby-1.9.3-p547@global/gems/bundler-1.7.2/lib/bundler/definition.rb:166:in `requested_specs'
~/.rvm/gems/ruby-1.9.3-p547@global/gems/bundler-1.7.2/lib/bundler/environment.rb:18:in `requested_specs'
~/.rvm/gems/ruby-1.9.3-p547@global/gems/bundler-1.7.2/lib/bundler/runtime.rb:13:in `setup'
~/.rvm/gems/ruby-1.9.3-p547@global/gems/bundler-1.7.2/lib/bundler.rb:121:in `setup'
~/.rvm/gems/ruby-1.9.3-p547@global/gems/bundler-1.7.2/lib/bundler/setup.rb:17:in `<top (required)>'
~/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:135:in `require'
~/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
~/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:144:in `require'
~/Documents/remsis/config/boot.rb:6:in `<top (required)>'
~/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
~/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
~/Documents/remsis/config/application.rb:1:in `<top (required)>'
~/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
~/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
~/Documents/remsis/config/environment.rb:2:in `<top (required)>'
~/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
~/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
~/Documents/remsis/config.ru:3:in `block in <main>'
~/Library/Application Support/Pow/Versions/0.4.3/node_modules/nack/lib/nack/builder.rb:4:in `instance_eval'
~/Library/Application Support/Pow/Versions/0.4.3/node_modules/nack/lib/nack/builder.rb:4:in `initialize'
~/Documents/remsis/config.ru:1:in `new'
~/Documents/remsis/config.ru:1:in `<main>'
~/Library/Application Support/Pow/Versions/0.4.3/node_modules/nack/lib/nack/server.rb:51:in `eval'
~/Library/Application Support/Pow/Versions/0.4.3/node_modules/nack/lib/nack/server.rb:51:in `load_config'
~/Library/Application Support/Pow/Versions/0.4.3/node_modules/nack/lib/nack/server.rb:42:in `initialize'
~/Library/Application Support/Pow/Versions/0.4.3/node_modules/nack/lib/nack/server.rb:12:in `new'
~/Library/Application Support/Pow/Versions/0.4.3/node_modules/nack/lib/nack/server.rb:12:in `run'
~/Library/Application Support/Pow/Versions/0.4.3/node_modules/nack/bin/nack_worker:4:in `<main>'
最佳答案
您运行的Bundler与您的服务器使用的不同版本的Ruby(2.1.3)(1.9.3)

转载注明原文:ruby-on-rails – 在任何来源中都找不到gem mime-types-2.4.1 - 代码日志