huobazi/carrierwave-qiniu

There was an error while trying to load the gem 'carrierwave-qiniu'.

Opened this issue · 2 comments

bundle install 完成之后,rails s遇到以下报错:

/Users/foo/.rvm/gems/ruby-2.2.2/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'carrierwave-qiniu'. (Bundler::GemRequireError)
    from /Users/foo/.rvm/gems/ruby-2.2.2/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
    from /Users/foo/.rvm/gems/ruby-2.2.2/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
    from /Users/foo/.rvm/gems/ruby-2.2.2/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
    from /Users/foo/.rvm/gems/ruby-2.2.2/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
    from /Users/foo/.rvm/gems/ruby-2.2.2/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
    from /Users/foo/.rvm/gems/ruby-2.2.2/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
    from /Users/foo/Dev/blademaster/config/application.rb:7:in `<top (required)>'
    from /Users/foo/.rvm/gems/ruby-2.2.2/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:78:in `require'     from /Users/foo/.rvm/gems/ruby-2.2.2/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:78:in `block in server'   
    from /Users/foo/.rvm/gems/ruby-2.2.2/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:75:in `tap'
    from /Users/foo/.rvm/gems/ruby-2.2.2/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:75:in `server'    from /Users/foo/.rvm/gems/ruby-2.2.2/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
    from /Users/foo/.rvm/gems/ruby-2.2.2/gems/railties-4.2.5.2/lib/rails/commands.rb:17:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'

我的Gemfile如下:

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.5.2'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
gem 'mysql2'
# 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/rails/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'
gem 'omniauth'
gem 'devise'
gem 'devise_token_auth'
gem 'omniauth-github'
gem 'omniauth-facebook'
gem 'omniauth-google-oauth2'
gem 'rack-cors', :require => 'rack/cors'
gem 'activeadmin', '~> 1.0.0.pre4'
gem 'will_paginate', '~> 3.1.0'
gem 'alipay', '~> 0.12.0'
gem 'unicorn'
gem 'yui-compressor'
gem 'sidekiq'
gem 'carrierwave'
gem 'carrierwave-qiniu'

# Use Unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug'
  gem 'better_errors', '~> 2.1.1'
  gem 'binding_of_caller'
end

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

gem "spring", group: :development

Rails新手表示不清楚问题出现的原因。

I meet this problem too, how to solve this problem?

@SomeOneToken

Reinstall carrierwave-qiniu gem after carrierwave installed