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

前端 未结 12 2143
南旧
南旧 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:33

    Firstly no need to go for sudo access while installing rvm, just follow the very basic commands below

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

    This will install rvm.

       $ rvm list known
       # MRI Rubies
       [ruby-]1.8.6[-p420]
       [ruby-]1.8.7[-p374]
       [ruby-]1.9.1[-p431]
       [ruby-]1.9.2[-p320]
       [ruby-]1.9.3[-p545]
       [ruby-]2.0.0-p353
    

    Install a version of ruby as required.

       $ rvm install 2.0.0-p353
    

    Now you can use the version of ruby for which you need to install rails as a gem.

       $ rvm use 2.0.0
    

    Also you can make it default if you want so

       $ rvm use 2.0 --default
    

    Next you can install rails as a gem.

        $ gem install rails
    

    gems should never be installed with sudo access as they change from project to project. rvm helps in managing the different versions of ruby in one m/c. You can also use gemsets to isolate gems and specific versions from one application to another.

提交回复
热议问题