2017-05-09 88 views
0

我一直在使用設計的應用程序在我的軌道添加認證bcrypt_ext,一切運行良好,但是當我試圖上申請我得到這個錯誤:無法加載這樣的文件 - 與色器件

LoadError in Devise::RegistrationsController#create 
cannot load such file -- bcrypt_ext 

我看着我gemfile,發現bcrypt寶石丟失,所以我安裝它,但這並沒有解決我的問題

雖然搜索我讀的地方,我必須重新啓動服務器後安裝bcrypt寶石我試過,現在當我嘗試啓動服務器我得到這個錯誤:

C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:293:in `require': cannot load such file -- bcrypt_ext (LoadError) 
    from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:293:in `block in require' 
    from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:259:in `load_dependency' 
    from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:293:in `require' 
    from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcrypt.rb:16:in `rescue in <top (required)>' 
    from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcrypt.rb:12:in `<top (required)>' 
    from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:91:in `require' 
    from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:91:in `block (2 levels) in require' 
    from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:86:in `each' 
    from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:86:in `block in require' 
    from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:75:in `each' 
    from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:75:in `require' 
    from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler.rb:106:in `require' 
    from C:/Sites/pro/config/application.rb:7:in `<top (required)>' 
    from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:88:in `require' 
    from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:88:in `block in server' 
    from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:85:in `tap' 
    from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:85:in `server' 
    from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:49:in `run_command!' 
    from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands.rb:18:in `<top (required)>' 
    from bin/rails:4:in `require' 
    from bin/rails:4:in `<main>' 

我的Gemfile

source 'http://rubygems.org' 

git_source(:github) do |repo_name| 
    repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") 
    "https://github.com/#{repo_name}.git" 
end 

git_source(:github) do |repo_name| 
    repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") 
    "https://github.com/#{repo_name}.git" 
end 


# Rails Server & Database Gems 
gem 'rails', '~> 5.0.2' 
gem 'sqlite3' 
gem 'puma', '~> 3.0' 
gem 'sass-rails', '~> 5.0' 
gem 'uglifier', '>= 1.3.0' 
gem 'coffee-rails', '~> 4.2' 
gem 'jquery-rails' 
gem 'turbolinks', '~> 5' 
gem 'jbuilder', '~> 2.5' 

# Twitter Bootstrap 
gem 'bootstrap-sass', '~> 3.3', '>= 3.3.7' 
gem 'autoprefixer-rails' 
gem 'font-awesome-rails' 

# Authentication 
gem 'devise' 
gem 'bcrypt', '~> 3.1.11' 

group :development, :test do 
    # Call 'yebug' anywhere in the code to stop execution and get a debugger console 
    gem 'byebug', platform: :mri 
end 

group :development do 
    # Access an IRB console on exception pages or by using <%= console %> anywhere in the code. 
    gem 'web-console', '>= 3.3.0' 
end 

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem 
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] 
+0

這解決了這個問題對我來說:https://開頭github.com/codahale/bcrypt-ruby/issues/142 – whodini9

+0

嘗試不加密寶石 – 7urkm3n

回答

0

嘗試寶石 '設計',github上: 'plataformatec /色器件'

包更新 捆綁安裝

相關問題