All threads / Command 'rails' not found but it used to work perfectly...

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Command 'rails' not found but it used to work perfectly...

Damian Nelwep asked in Rails

Hello everyone,
I'm having some issue I really don't know why... It is the second time I get this but, after working on a Rails project without any problem, I try to get back to it and it tells me :

Command 'rails' not found, but can be installed with:

sudo apt install ruby-railties

But I installed Rails already and as I said, it worked perfectly... So anyone could help and tell me how and why this could happend.

Thank you

By the way I also tried

gem update bundler
Updating installed gems
Updating bundler
Fetching: bundler-2.0.1.gem (100%)
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /var/lib/gems/2.5.0 directory.

I could do sudo but I think it's not normal that I have to do it this way...

Yeah, sounds like you don't have rbenv in your PATH env var.

And you're right, never use sudo because you'll end up with permissions errors.

Ok so the best thing to do may be to remove any trace of rbenv ..?

In the end the main problem was just because I used an other Terminal version (Terminator in place of the classic one) but anyways I don't know if this is a 'normal' issue...

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 33,399+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.