2017-12-29 25 views
0
私はレールを学んでrailstutorial.orgを次されており、そして今、私は私の誤差はありますが、テストはテストされていないレールとサーバーのISN「のレールどこかわからない

レールテストは、サーバーと動作していない他の人をレール

C:\Sites\sample_app>rails test 
C:/RailsInstaller/Ruby2.3.3/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.3/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.3/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.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:81:in `require' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:81:in `block (2 levels) in require' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `each' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `block in require' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `each' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `require' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler.rb:114:in `require' 
     from C:/Sites/sample_app/config/application.rb:7:in `<top (required)>' 
     from C:/Sites/sample_app/config/environment.rb:2:in `require_relative' 
     from C:/Sites/sample_app/config/environment.rb:2:in `<top (required)>' 
     from C:/Sites/sample_app/test/test_helper.rb:1:in `require' 
     from C:/Sites/sample_app/test/test_helper.rb:1:in `<top (required)>' 
     from C:/Sites/sample_app/test/controllers/static_pages_controller_test.rb:1:in `require' 
     from C:/Sites/sample_app/test/controllers/static_pages_controller_test.rb:1:in `<top (required)>' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/test_unit/runner.rb:50:in `require' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/test_unit/runner.rb:50:in `block in load_tests' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/test_unit/runner.rb:50:in `each' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/test_unit/runner.rb:50:in `load_tests' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/test_unit/runner.rb:39:in `run' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/test/test_command.rb:38:in `perform' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/command/base.rb:63:in `perform' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/command.rb:44:in `invoke' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands.rb:16:in `<top (required)>' 
     from bin/rails:4:in `require' 
     from bin/rails:4:in `<main>' 

に来てtはここでは

からだどこあなただけ教えて、任意のページを見たい場合、私はしてください知らないレールsの

C:\Sites\sample_app>rails s 
C:/RailsInstaller/Ruby2.3.3/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.3/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.3/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.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:81:in `require' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:81:in `block (2 levels) in require' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `each' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `block in require' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `each' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `require' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler.rb:114:in `require' 
     from C:/Sites/sample_app/config/application.rb:7:in `<top (required)>' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:133:in `require' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:133:in `block in perform' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:130:in `tap' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:130:in `perform' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/command/base.rb:63:in `perform' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/command.rb:44:in `invoke' 
     from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands.rb:16:in `<top (required)>' 
     from bin/rails:4:in `require' 
     from bin/rails:4:in `<main>' 

のエラーコードです、私はそれをアップロードします

答えて

0

First of all comment out # gem bcrypt, '3.1.11' and run bundle install.After that uninstall the gem with gem uninstall bcrypt .Then re-install gem install bcrypt --platform=ruby .The important part, un-comment gem 'bcrypt', '~> 3.1.11', platforms: [:ruby, :x64_mingw, :mingw] and then bundle install.Thats it.Note the mingw part at the end.This should be the key.

source

+0

私はパスワードを保護することができますか? –

+0

停止。あなたは宝石を取り除かないで、答えを慎重に読んでください。あなたはbcryptをアンインストールし、あなたの勝利のプラットフォームのためにそれを正しくインストールします。 –

+0

良い、私のサーバーは今ですが、レールテストは私に別のものを教えています。 –

0

a)の宝石アンインストールbcryptの-ルビー

b)のごgemfileで、

宝石 'bcryptの' を追加、gitの 'https://github.com/codahale/bcrypt-ruby.git':必要=> ' bcrypt '

c)バンドルインストール

Thi Windows上で動作します

幸運

関連する問題