Note for developer. Haha just kidding. This is a note that records some of the setup process or technical issues faced during the development of this project.
A note of how I setup my environment for Ruby and Rails inside WSL.
- Following microsoft docs
- Following rvm github
- arrays & ranges
- hashes & symbols
- block
- Instance variable vs local variable vs class variable
- Article about red, green, & refactor
- ActiveSupport::Testing::Assertions, there are many assertions example here.
- Example, the
_file.html.erb
with underscore at front is the convention of defining partials. Partials is like a snippet of code that could be inserted into other html.erb codes.
- password digest, aka, hashed password.
- Fixtures are a way of organizing data for testing. ActiveRecord::Fixtures
- Basically a shortcut for instance variable functionality. Learn more about attr_accessor
Basically, rails consists of 3 Action Packs
- Action Dispatch routes request to controllers
- Action Controller converts requests into responses
- Action View is used by Action Controller to format those reponse
Learn more in this blog
Raise
an exceptiondebugger
to debug
- Basically add to the end of this array, see also this stackoverflow or this ruby doc
<strong>
tag shows the text with strong importance and it's usually bold
Some other troubles I got into, haih...
- Long story short.. change to root user and chpsswd for liew user, then relogin back.
wslview filename.pdf
- Checkout this github issue
- Explained in stackoverflow.
- Received a warning messsage: "The nearest package directory doesn't seem to be part of the project". Turns out it is because there's a yarn.lock (or package.json) file higher up in the filetree, see this github issue
- No matching yarn versin
- Additionally, to change yarn version, somehow I need to delete .yarnrc file, shown in stackoverflow.
- Use
$ bin/spring stop
, stackoverflow
- Error:
ActiveRecord :: StatementInvalid: SQLite3 :: BusyException: database is locked
, tried all methods listed here. However, the one that only works is ... restarting my computer...