Notifications
You’re not receiving notifications from this thread.
Struggling to get rails working
If I use "sudo gem install rails", it says everything is installed
Then I hit "rbenv rehash" and try to create a new project. The CLI gives me the error:
Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
If I don't use "sudo" I get:
ERROR: While executing gem ... (Errno::EACCES)
Permission denied @ dir_s_rmdir - /usr/local/lib/ruby/gems/2.7.0/gems/actioncable-6.0.3.2
What's going on? How can I start again?
I feel like it's not looking in the right place to find rails
I changed the permissions on the directories and it no longer throws the ERROR message:
$ sudo chown -R $(whoami) /usr/local/lib/ruby/gems/*
However,
$ rails new project
Still throws:
"Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails"
There is Ruby 2.6.0 (/usr/lib/ruby/) and Ruby 2.7.1 (/.rbenv/versions/2.7.1/lib/ruby/) installed on my machine.
It could be pointing to 2.6.0 instead of 2.7.1, it looks like the gems are installed properly on the 2.7.1 version
Webpacker successfully installed!!
I don't know what happened but I uninstalled rbenv in brew and reinstalled in, reran the doctor and it seemed to work:
This page was immensely helpful - https://github.com/rbenv/rbenv#locating-the-ruby-installation
I was about to turf it all and setup a venv