0

I'm using ruby 2.2.4. I get this error when I tried to sign up after installing the Devise gem. I never experienced this error when I used to use ruby 2.1.5. Is the ruby version the cause of the error here?

UPDATE: this is what my gemfile looks like and I'm using Windows 7 Professional 64-bit

source 'https://rubygems.org'


gem 'rails', '4.2.5.1'
gem 'sqlite3'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'simple_form', '~> 3.2', '>= 3.2.1'
gem 'country_select', '~> 2.5', '>= 2.5.1'
gem 'devise', '~> 3.5', '>= 3.5.6'

group :doc do
    gem 'sdoc', '~> 0.4.0'
end


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

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

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Jeramae Bohol
  • 185
  • 2
  • 14

1 Answers1

1

Devise 3.5.6 needs bcrypt <= 3.0, which you probably have, but some versions of bcrypt were not supported with specific versions of Ruby on Windows, which is probably what you're seeing.

This is what I dug up on the bcrypt github repo:

1) Launch a terminal session
2) Enter gem uninstall bcrypt
3) Enter gem uninstall bcrypt-ruby
4) Enter gem install bcrypt --platform=ruby
5) Edit your gemfile to include the following line:
   gem 'bcrypt-ruby', '3.1.5', :require => 'bcrypt'
6) Run bundle install
MarsAtomic
  • 10,436
  • 5
  • 35
  • 56
  • when I add the gem 'bcrypt-ruby', '3.1.5', :require => 'bcrypt' and bundle install it, the server won't run anymore. – Jeramae Bohol Feb 16 '16 at 04:59
  • What do you mean by "won't run?" Does the log include an error message? Does it hang? – MarsAtomic Feb 16 '16 at 05:19
  • when I run rails server, it returns a long error. But when I remove the 'bcrypt-ruby', '3.1.5', :require => 'bcrypt' and run the rails server, it runs but the issue still not fixed. – Jeramae Bohol Feb 16 '16 at 05:46
  • 2
    When you run into an error, you need to state what the error says, otherwise you can expect stony silence on my end. I'm not sitting next to you -- I cannot see your screen. You need to learn to be both complete and descriptive when asking for help. If you get an error, don't just say "I got an error" when you know I'm going to ask you what the error message said. – MarsAtomic Feb 17 '16 at 04:53
  • @MarsAtomic I get this error after adding gem you suggested `C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in require': cannot load such file -- bcrypt_ext (LoadError)` – Eesa Feb 28 '17 at 12:14
  • @essaji You need to ask questions by posting new questions, not by asking in a comment to a different question. Make sure to include your Rails version and operating system. As I wrote a year ago, you need to be complete and descriptive, otherwise, no one can answer your question. – MarsAtomic Mar 01 '17 at 04:08
  • Hi sir @MarsAtomic can you check my forum?http://stackoverflow.com/questions/43461267/loaderror-in-deviseregistrationscontrollercreate – Angel Apr 17 '17 at 23:43