seems the problem is not just with rake.
doing a

ruby script/generate model <insert name>

gives the following:

./script/../config/boot.rb:29: undefined method `gem' for main:Object
(NoMethodError)
        from script/generate:2

which looks to be the same problem.
I know gem is installed and at least partially working as I can do a

gem update rails --include-dependencies

and ruby seems to be working as well.

Not sure why ruby can't talk to gem (or at least that is what seems to
be going on imo)