前提・実現したいこと
centos8環境下で、webpackerを使って、railsを立ち上げたい
ここに質問の内容を詳しく書いてください。
centos8環境下で、railsアプリケーションを作ろうとしています。
bundle installは上手く行き、yum nodejs を入れて、webpackerをインストールしようとし,
bundle exec rails webpacker:install
を実行したところ、エラーが出ました。
他のrailsコマンドでもエラーが出たので、根本的なところで間違えていると思っています。
■■な機能を実装中に以下のエラーメッセージが発生しました。
発生している問題・エラーメッセージ
rails aborted! LocalJumpError: no block given /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/actionpack-6.0.3.2/lib/action_dispatch/routing/route_set.rb:426:in `instance_exec' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/actionpack-6.0.3.2/lib/action_dispatch/routing/route_set.rb:426:in `eval_block' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/actionpack-6.0.3.2/lib/action_dispatch/routing/route_set.rb:408:in `draw' /home/vagrant/instagram/photoBase/config/routes.rb:1:in `<main>' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:in `load' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:in `load' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/application/routes_reloader.rb:40:in `block in load_paths' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/application/routes_reloader.rb:40:in `each' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/application/routes_reloader.rb:40:in `load_paths' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/application/routes_reloader.rb:20:in `reload!' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/application/routes_reloader.rb:29:in `block in updater' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/file_update_checker.rb:83:in `execute' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/application/routes_reloader.rb:10:in `execute' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/application/finisher.rb:184:in `block in <module:Finisher>' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:32:in `instance_exec' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:32:in `run' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:61:in `block in run_initializers' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:60:in `run_initializers' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/application.rb:363:in `initialize!' /home/vagrant/instagram/photoBase/config/environment.rb:5:in `<main>' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.0/lib/zeitwerk/kernel.rb:34:in `require' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:324:in `block in require' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:291:in `load_dependency' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:324:in `require' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/application.rb:339:in `require_environment!' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/application.rb:523:in `block in run_tasks_blocks' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/commands/rake/rake_command.rb:23:in `block in perform' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/commands/rake/rake_command.rb:20:in `perform' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/command.rb:48:in `invoke' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/railties-6.0.3.2/lib/rails/commands.rb:18:in `<main>' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.4.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:324:in `block in require' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:291:in `load_dependency' /home/vagrant/instagram/photoBase/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:324:in `require' ./bin/rails:4:in `<main>' Tasks: TOP => app:template => environment (See full trace by running task with --trace)
該当のソースコード
[vagrant@centos8 photoBase]$ bundle exec rails webpacker:install
試したこと
yarn nodejsを導入
gemfileにgem 'webpacker', github: "rails/webpacker"
を行い、bundle installを行う。 実行済
centos8の環境下で
bundle exec rails new photoBase
cd photoBase
sudo yum install -y yarn
bundle exec rails webpacker:install ここでエラー
補足情報(FW/ツールのバージョンなど)
centos8
yarn 1.22.4
nodejs v14.6.0
ruby 2.7.1
rails 6.0.3.2
あなたの回答
tips
プレビュー