2017-03-17 6 views
0

を起動するとき、私は私の地元のレール・サーバを起動しようとすると、私は次のエラーを取得する:Railsのエラーサーバー

C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcrypt.rb:16:in `require': cannot load such file -- bcrypt_ext (LoadError) 
    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.14.6/lib/bundler/runtime.rb:91:in `require' 
    from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/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.14.6/lib/bundler/runtime.rb:86:in `each' 
    from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in `block in require' 
    from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `each' 
    from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `require' 
    from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler.rb:107:in `require' 
    from C:/Users/Frank/Dropbox/DePaul/Year 2/Winter/IT 232/divdev232/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 'https://rubygems.org' 

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 
gem 'rails', '~> 5.0.0', '>= 5.0.0.1' 

# Use sqlite3 as the database for Active Record 
gem 'sqlite3' 

# Use Puma as the app server 
gem 'puma', '~> 3.0' 

# 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.2' 

# 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 navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks 
gem 'turbolinks', '~> 5' 

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 
gem 'jbuilder', '~> 2.5' 

# Use Redis adapter to run Action Cable in production 
# gem 'redis', '~> 3.0' 

# Use ActiveModel has_secure_password 
gem 'bcrypt', '~> 3.1.7' 

# 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', platform: :mri 
end 

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

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

答えて

1

は私のソリューションです:

は、まず次の2つのコマンドを実行してbcryptのとbcryptの-ルビーをアンインストール:

  1. gem uninstall bcryptgem uninstall bcrypt-ruby
  2. で再びそれをインストールします。 gem install bcrypt --platform=ruby
  3. Gemfileで書き込みgem 'bcrypt-ruby', '3.1.5', :require => 'bcrypt'

  4. 実行bundle install

+0

'私はちょうど私のGemfileに新しい行を追加してくださいまたは私はgemfileと実行で現在bcryptのライン – Frank

+0

変更ラインを交換しますbundle install' – Sajin

+0

'bundle install'を実行すると、 – Frank

1

更新Gemfileに:

gem 'bcrypt-ruby', '3.1.1.rc1', :require => 'bcrypt' 
+0

走る – Frank

+0

はい、私はまだエラーを取得する私のコード – puneet18

+0

でそれを置き換えるためにそれを試して – Frank