2017-03-17 1 views
0

Lorsque je tente de lancer mon serveur rails locaux, je reçois l'erreur suivante:Rails d'erreur lors du lancement du serveur

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>' 

Je suis confus dans ce que tout cela signifie, ou comment le réparer, comme je Je me familiarise toujours avec les rails. Voici mon Gemfile actuel:

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] 

Répondre

1

est ma solution ici:

Tout d'abord désinstaller bcrypt et bcrypt-ruby en exécutant ces deux commandes:

  1. gem uninstall bcrypt et gem uninstall bcrypt-ruby
  2. Installez-le à nouveau avec gem install bcrypt --platform=ruby
  3. Dans votre Gemfile écrivez gem 'bcrypt-ruby', '3.1.5', :require => 'bcrypt'

  4. Run bundle install

+0

Ai-je simplement ajouter la nouvelle ligne à mon Gemfile ou dois-je remplacer la ligne bcrypt actuelle – Frank

+0

ligne de changement dans Gemfile et exécutez ' bundle install' – Sajin

+0

Ya, rien de tout cela ne l'a corrigé – Frank

1

Mise à jour Gemfile à:

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

Est-ce que remplacer la ligne bcrypt actuelle ?: bijou « bcrypt », « ~> 3.1.7 » – Frank

+0

oui, essayez de le remplacer par mon code – puneet18

+0

je reçois toujours l'erreur qui – Frank