bash: /home/XXX/.rvm/scripts/rvm: No such file or directory

前端 未结 12 2112
南旧
南旧 2021-02-04 05:48

I just walk-through with the installation of Ruby on Rails on Ubuntu using RVM.

First I have logged in as the root user.

Then I started with the f

相关标签:
12条回答
  • 2021-02-04 06:34

    Alright so when you get a failure message "No such file or directory", type

    \curl -L https://get.rvm.io | bash -s stable
    

    in your terminal. There will be a GPG signature verification failure. Bellow that failure there would be a link for github and a key something like this

    gpg2 --recv-keys 409B6B...
    

    So download a tar file from the github link and run this code to install GPG:

    sudo apt install gnupg2
    

    and run that key :

    gpg2 --recv-keys 409B6B...
    

    next run the code:

    \curl -L https://get.rvm.io | bash -s stable
    

    it will show you installing the rvm and then you can run:

    source ~/.rvm/scripts/rvm
    

    thats it you are good to go

    0 讨论(0)
  • 2021-02-04 06:35

    Is generally not recommend to install RVM as a root user because of umask security risk. Try running these commands as a user.

    Downloading RVM (Do not sudo this command)

    \curl -sSL https://get.rvm.io | bash -s stable --rails
    

    Then you'll need to add the location to sources(You'll probably need to reload your bash for rvm to work)

    source ~/.rvm/scripts/rvm
    

    You can install your desired version like so(replace ruby_version with one you would like to install, eg 2.1.4)

    rvm install ruby_version
    

    To list the available version on your machine

    rvm list
    

    To use a version of ruby run

    rvm use ruby_version
    

    If you have any trouble refere to the RVM website

    0 讨论(0)
  • 2021-02-04 06:42

    Install RVM:

    gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
    

    Now you will get a success message. Then, run this command:

    \curl -sSL https://get.rvm.io | bash -s stable
    

    See http://rvm.io/ for more info.

    0 讨论(0)
  • 2021-02-04 06:43

    Can you use sudo find to locate the correct path of the rvm directory? If you find the path, you should be able to rerun the source ~/.rvm/scripts/rvm command with the correct path.

    Also, I fully agree with the previous answers about not creating it as root. DigitalOcean was a pretty good tutorial on adding users https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-14-04

    0 讨论(0)
  • 2021-02-04 06:44

    After installing rvm, try:

    source ~/.rvm/scripts/rvm
    

    If the above command throws some issue, try this command:

    source /usr/local/rvm/scripts/rvm
    
    0 讨论(0)
  • 2021-02-04 06:47

    As root, you traditionally don't have a /home folder. Root's home is different than a normal user.

    You very likely don't want to install RVM as root.

    Please do read the information at http://rvm.io specifically the installation notes.

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