What I did:
-
rails new gameapp --database=mysql
-
Update .gitignore
-
git init ; git add -A ; git ci -m "Created dir"
-
Edit gemfile to use sqlite3 in dev/test
-
Create the users and profile thing
-
rails generate model Profile theme:integer karma:float
-
rails generate scaffold User username:string email:string password:digest is_temporary:boolean profile_id:number
-
git push to placenta -- to get the basics worked out...
-
rails test:
- fails :
ActionView::Template::Error: Webpacker can't find application.js in /Users/ericp/lab/rails/cable05/gameapp/public/packs-test/manifest.json. Possible causes:
9.1.
I ended up finding a fix for my issue through this link: https://discuss.rubyonrails.org/t/pretty-astonishing/76850
$ yarn remove @rails/webpacker
$ rm -rf ./node_modules
$ yarn add @rails/webpacker@^5.4.4
^ didn't work
$ yarn remove @rails/webpacker
$ npm install --save-dev @rails/webpacker
That didn't work. Try this:
$ rake assets:precompile ->
Cannot find package '@babel/plugin-proposal-private-methods' imported from /Users/ericp/lab/rails/cable05/gameapp/babel-virtual-resolve-base.js
$ npm install --save-dev @babel/plugin-proposal-private-methods
$ npm install --save-dev @babel/plugin-proposal-private-property-in-object
$ yarn
$ ./bin/webpack-dev-server
-
Gemfile dependency problems? See https://github.com/learnenough/rails_tutorial_6th_edition_gemfiles/blob/master/sample_app/Gemfile
-
Postgres fun and games
This disables the brain-dead postgres CLI, which clears the screen all the time PAGER= psql ...
- How to fix the uninitialized constant warnings: Add the following to the gemfile:
gem "net-ftp", "~> 0.2.0", require: false
gem "net-http"