@friday1

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

gem 'devise' インストール後の rails g devise:installが実行できない

環境

Ruby '2.6.7'
Rails '5.2.6'

解決したいこと

GemFile
gem 'devise'

を記述し、コマンドプロンプトで

bundle install

を実行後、
gem listでdevise (4.8.0)がインストールされているのを確認はしているのですが、

rails g devise:install

を実行すると

C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require': cannot load such file -- bindex (LoadError)
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:89:in `register'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:44:in `require'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:291:in `block in require'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:257:in `load_dependency'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:291:in `require'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/web-console-3.7.0/lib/web_console/railtie.rb:11:in `block in <class:Railtie>'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.6/lib/rails/initializable.rb:32:in `instance_exec'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.6/lib/rails/initializable.rb:32:in `run'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.6/lib/rails/initializable.rb:61:in `block in run_initializers'
        from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each'
        from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
        from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from'
        from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component'
        from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:347:in `each'
        from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:347:in `call'
        from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component'
        from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each'
        from C:/Ruby26-x64/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.6/lib/rails/initializable.rb:60:in `run_initializers'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.6/lib/rails/application.rb:361:in `initialize!'
        from C:/Users/shint/Desktop/Ruby/ruby_todo/config/environment.rb:5:in `<main>'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:291:in `block in require'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:257:in `load_dependency'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-5.2.6/lib/active_support/dependencies.rb:291:in `require'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.6/lib/rails/application.rb:337:in `require_environment!'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.6/lib/rails/command/actions.rb:28:in `require_environment!'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.6/lib/rails/command/actions.rb:15:in `require_application_and_environment!'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.6/lib/rails/commands/generate/generate_command.rb:21:in `perform'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.6/lib/rails/command/base.rb:69:in `perform'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.6/lib/rails/command.rb:46:in `invoke'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.6/lib/rails/commands.rb:18:in `<main>'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
        from bin/rails:4:in `<main>'

とエラーが出ます

自分で試したこと

ruby railsをいくつかバージョンを変え
Bundler、deviseそれぞれ

gem uninstall ~
gem install ~ -v=~

でアンインストール後バージョン指定をし再度インストール後rails g devise:installを行っても変わりませんでした。

解決策が分かる方いらっしゃいましたら回答お願いいたします。

0 likes

1Answer

Your answer might help someone💌