Regarding you running
$ rails c and getting a prompt, that at least tells me the ruby code itself works…
The fact you used
sudo gem install rails tells me you’re using system Ruby. System Ruby doesn’t usually allow write access to where it stores gems (being its system ruby it’s installation dirs are owned by root). I am not sure if it would cause an issue, but it’s possible there’s permission snaffus going on. That might explain whatever the “huge list of things” you mentioned resulted in.
When I’m forced to work with system Ruby, one thing I usually do is point Ruby to install and manage gems in a directory owned by the user. Usually I put export
GEM_HOME=/home/USER/.gem/ruby/2.7.0 and append
/home/USER/.gem/ruby/2.7.0/bin to my
$PATH in my bash profile which tells the gem binary that all gems should live in that directory which you have write access. If after refreshing your environment try to run
$ bundle install to install a freash set of dependencies for your app. If bundler suddenly isn’t there,
$ gem install bundler first (as it too is a gem and we told ruby gems live in a different directory now).
Another option is to stop using system ruby and use a Ruby version manager such as rbenv or rvm which manages and installs different versions of ruby that your Linux user has full access to and allows you to swap between versions quickly.
Ether way, most Ruby devs try to stay away from system Ruby unless they have no other option.
Beyond that though, other than needing to pretty much have screen share to see what it is you’re seeing, I don’t know if there’s much left I could suggest.
I looked at the guides page. Nothing seems too out of the ordinary in the steps, though I do wish it didn’t gloss over “installing Ruby” as system Ruby on distros are commonly either out of date or they don’t give global write access to gem installation.
Sorry I can’t be more help