ruby 2.4.1p111 (2017-03-22 revision 58053) [x64-mingw32]
Rails 5.0.5
RSpec 3.6
When I run > rails generate rspec:install , its showing me this error:
`C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ffi-1.9.18-x64-mingw32/lib/ffi/library.rb
:147:in `block in ffi_lib': Could not open library 'C:\Program Files (x86)\MIT\K
(LoadError)gssapi32.dll': The specified module could not be found.
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ffi-1.9.18-x64-mingw32/lib/f
fi/library.rb:100:in `map'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ffi-1.9.18-x64-mingw32/lib/f
fi/library.rb:100:in `ffi_lib'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/gssapi-1.2.0/lib/gssapi/lib_
gssapi_loader.rb:31:in `load_mit'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/gssapi-1.2.0/lib/gssapi/lib_
gssapi_loader.rb:70:in `<module:LibGSSAPI>'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/gssapi-1.2.0/lib/gssapi/lib_
gssapi_loader.rb:7:in `<module:GSSAPI>'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/gssapi-1.2.0/lib/gssapi/lib_
gssapi_loader.rb:6:in `<top (required)>'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/gssapi-1.2.0/lib/gssapi/lib_
gssapi.rb:6:in `require'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/gssapi-1.2.0/lib/gssapi/lib_
gssapi.rb:6:in `<top (required)>'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/gssapi-1.2.0/lib/gssapi.rb:1
7:in `require'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/gssapi-1.2.0/lib/gssapi.rb:1
7:in `<top (required)>'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ruby-kafka-0.4.0/lib/kafka/s
asl_gssapi_authenticator.rb:1:in `require'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ruby-kafka-0.4.0/lib/kafka/s
asl_gssapi_authenticator.rb:1:in `<top (required)>'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ruby-kafka-0.4.0/lib/kafka/c
onnection_builder.rb:1:in `require'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ruby-kafka-0.4.0/lib/kafka/c
onnection_builder.rb:1:in `<top (required)>'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ruby-kafka-0.4.0/lib/kafka/c
lient.rb:11:in `require'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ruby-kafka-0.4.0/lib/kafka/c
lient.rb:11:in `<top (required)>'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ruby-kafka-0.4.0/lib/kafka.r
b:226:in `require'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ruby-kafka-0.4.0/lib/kafka.r
b:226:in `<top (required)>'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ruby-kafka-0.4.0/lib/ruby-ka
fka.rb:3:in `require'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ruby-kafka-0.4.0/lib/ruby-ka
fka.rb:3:in `<top (required)>'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/lib/bundler/r
untime.rb:82:in `require'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/lib/bundler/r
untime.rb:82:in `block (2 levels) in require'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/lib/bundler/r
untime.rb:77:in `each'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/lib/bundler/r
untime.rb:77:in `block in require'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/lib/bundler/r
untime.rb:66:in `each'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/lib/bundler/r
untime.rb:66:in `require'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/lib/bundler.r
b:108:in `require'
from C:/Data/projects/incubator/CSM/Microservices/eagle-adapter/config/a
pplication.rb:17:in `<top (required)>'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.0.5/lib/rails/com
mands/commands_tasks.rb:156:in `require'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.0.5/lib/rails/com
mands/commands_tasks.rb:156:in `require_application_and_environment!'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.0.5/lib/rails/com
mands/commands_tasks.rb:143:in `generate_or_destroy'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.0.5/lib/rails/com
mands/commands_tasks.rb:60:in `generate'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.0.5/lib/rails/com
mands/commands_tasks.rb:49:in `run_command!'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.0.5/lib/rails/com
mands.rb:18:in `<top (required)>'
from bin/rails:9:in `require'
from bin/rails:9:in `<main>'`
Any idea , how to fix this issue?
NB : I am new to ruby/rails.
Try spring stop and run again.
Hi, I'm sorry you're having difficultly, from the stack trace it looks like you have an issue with your Ruby installation on windows, I would suggest stripping back your gems (try removing kafka first) until you can run any of the Rails generator command. The RSpec install doesn't do much but copy template files into position rspec init will do most of the work for you instead but you'll need to copy spec_helper.rb and rails_helper.rb manually (I've linked to the currently generated versions).
I'm closing because this doesn't look like anything we can directly help with :(
Most helpful comment
Try
spring stopand run again.