2015-02-24 64 views
6

当从我的终端(Mac OSX上的优胜美地)我收到以下错误运行轨道S指令:Rails的服务器将不会运行 - 无法找到宝石错误

Could not find mime-types-2.4.3 in any of the sources 
Run `bundle install` to install missing gems. 

当我运行捆绑安装我获得 '使用MIME类型2.4.3'

Using rake 10.4.2 
Using i18n 0.7.0 
Using json 1.8.2 
Using minitest 5.5.1 
Using thread_safe 0.3.4 
Using tzinfo 1.2.2 
Using activesupport 4.2.0 
Using builder 3.2.2 
Using erubis 2.7.0 
Using mini_portile 0.6.2 
Using nokogiri 1.6.6.2 
Using rails-deprecated_sanitizer 1.0.3 
Using rails-dom-testing 1.0.5 
Using loofah 2.0.1 
Using rails-html-sanitizer 1.0.1 
Using actionview 4.2.0 
Using rack 1.6.0 
Using rack-test 0.6.3 
Using actionpack 4.2.0 
Using globalid 0.3.3 
Using activejob 4.2.0 
Using mime-types 2.4.3 
Using mail 2.6.3 
Using actionmailer 4.2.0 
Using activemodel 4.2.0 
Using arel 6.0.0 
Using activerecord 4.2.0 
Using debug_inspector 0.0.2 
Using binding_of_caller 0.7.2 
Using coffee-script-source 1.9.1 
Using execjs 2.3.0 
Using coffee-script 2.3.0 
Using thor 0.19.1 
Using railties 4.2.0 
Using coffee-rails 4.1.0 
Using hike 1.2.3 
Using multi_json 1.10.1 
Using jbuilder 2.2.8 
Using jquery-rails 4.0.3 
Using bundler 1.7.12 
Using tilt 1.4.1 
Using sprockets 2.12.3 
Using sprockets-rails 2.2.4 
Using rails 4.2.0 
Using rdoc 4.2.0 
Using sass 3.4.12 
Using sass-rails 5.0.1 
Using sdoc 0.4.1 
Using spring 1.3.2 
Using sqlite3 1.3.10 
Using turbolinks 2.5.3 
Using uglifier 2.7.0 
Using web-console 2.0.0 

但在运行 '轨道S' 命令再次导致相同的错误消息:

Could not find mime-types-2.4.3 in any of the sources 
Run `bundle install` to install missing gems. 

这里的Gemfile中(默认1瓦特我的Rails 4.2创建):

source 'https://rubygems.org' 


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 
gem 'rails', '4.2.0' 
# Use sqlite3 as the database for Active Record 
gem 'sqlite3' 
# Use SCSS for stylesheets 
gem 'sass-rails', '~> 5.0' 
# Use Uglifier as compressor for JavaScript assets 
gem 'uglifier', '>= 1.3.0' 
# Use CoffeeScript for .coffee assets and views 
gem 'coffee-rails', '~> 4.1.0' 
# See https://github.com/sstephenson/execjs#readme for more supported runtimes 
# gem 'therubyracer', platforms: :ruby 

# 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 'jbuilder', '~> 2.0' 
# bundle exec rake doc:rails generates the API under doc/api. 
gem 'sdoc', '~> 0.4.0', group: :doc 

# 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 

group :development, :test do 
    # Access an IRB console on exception pages or by using <%= console %> in views 
    gem 'web-console', '~> 2.0' 

    # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring 
    gem 'spring' 
end 

注 - MIME类型2.4.3位于Gemfile.lock的

任何想法是什么问题是?

谢谢你的时间。

+0

尝试'包更新mime-types'。如果没有任何工作,分享Gemfile,以便我们可以看看它。谢谢 – 2015-02-24 01:50:25

+0

我已经运行了软件包更新MIME类型。同样的错误依然存在。我已经添加了gemfile(这是'rails new appname'命令生成的那个。 – 2015-02-24 02:00:06

回答

12

尝试捆绑安装--path供应商/缓存

+0

这样做后,我得到了相同的错误 – 2015-02-24 01:55:18

+1

尝试'捆绑安装 - 路径供应商/缓存' – 2015-02-24 01:59:42

+0

这没有窍门 - 感谢Dylan! – 2015-02-24 02:04:06

1

尝试

bundle update mime-types 

然后再次运行服务器。

+0

试过了 - 同样的错误仍然存​​在。很少,它的工作。 – 2015-02-24 02:05:03

相关问题