I am attempting to create my first Ruby on Rails application following the documentation outlined on the website. When I attempted to run the server with 'rails server' from the cmd line I receive this error...
C:/Ruby/rubyinstaller-2.5.5-1-x64/rubyinstaller-2.5.5-1-x64/lib/ruby/gems/2.5.0/gems/webpacker-4.0.7/lib/webpacker/configuration.rb:91:in `rescue in load': Webpacker configuration file not found C:/Users/{username}/Desktop/Projects/Ruby on Rails/Blog Application/blog/config/webpacker.yml. Please run rails webpacker:install Error: No such file or directory @ rb_sysopen - C:/Users/{username}/Desktop/Projects/Ruby on Rails/Blog Application/blog/config/webpacker.yml
OS: Windows 10
Yarn version: 1.17.3
Node.js version - v10.15.3
Rails version - 6.0.0
Ruby version - Ruby 2.5.5p157 (2019-03-15 revision 67260) [x64-mingw32]
sqlite3 version - 3.22.0
I expect for the server to run successfully and to open localhost:3000 to Yay! You're on rails
To add Webpacker to an existing project, add the webpacker gem to the project's Gemfile , run bundle install , and then run bin/rails webpacker:install . The installation also calls the yarn package manager, creates a package. json file with a basic set of packages listed, and uses Yarn to install these dependencies.
Method: Webpacker::Helper#javascript_pack_tagCreates a script tag that references the named pack file, as compiled by webpack per the entries list in package/environments/base. js. By default, this list is auto-generated to match everything in app/javascript/packs/*. js.
You may want to install yarn
and then recreate your application if rails webpacker:install
doesn't work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With