Using RVM on Ubuntu 12.04 to use Rails. The program 'rails' is currently not installed

后端 未结 3 2012
刺人心
刺人心 2021-01-30 14:42

I installed RVM from scratch following the installation guide on the official website. I installed Rails, created a dummy app and everything worked fine.

I shut off my m

相关标签:
3条回答
  • 2021-01-30 15:01

    Here is another possibility. This happened to me. Everything was working fine and sudo'ed into root. I left the terminal open and returned a couple of days later.

    rails would not work. Just like you said it was there in the gems. Turns out that I just needed to exit out of the root user and go back to my regular user and rails was fine.

    0 讨论(0)
  • 2021-01-30 15:08

    You need to type source ~/.rvm/scripts/rvm before attempting to use Rails.

    I believe the RVM installation suggests putting this line (or something similar) in your .bashrc.

    Run the following command in Terminal:

    echo "source \$HOME/.rvm/scripts/rvm" >> ~/.bashrc
    

    This appends the line source \$HOME/.rvm/scripts/rvm to the end of the .bashrc file.

    Doing so ensures that RVM is properly loaded each time you open up a terminal.

    0 讨论(0)
  • 2021-01-30 15:08

    the proper fix is it https://rvm.io/integration/gnome-terminal/

    you should not add source ~/.rvm/scripts/rvm to ~/.bashrc, you can find some more details here: https://rvm.io/support/faq/#shell_login

    0 讨论(0)
提交回复
热议问题