RVM finding system gems' executables

后端 未结 3 1459
囚心锁ツ
囚心锁ツ 2021-02-15 19:04

I have installed RVM along with ruby versions. However if I fire up the console and run the command rails server, bundle install, etc. I get this error

bash: /us         


        
3条回答
  •  情话喂你
    2021-02-15 19:33

    I just solved the same problem on Windows Vista.

    My console was giving me this message:

    $ rails -v
    sh: /c/RailsInstaller/Ruby1.9.2/bin/rails: C:/Projects/railsinstaller/Stage/Ruby1.9.2  /bin/ruby.exe: bad interpreter: No such file or directory
    

    I just edited the first line of this file:

    C:\RailsInstaller\Ruby1.9.2\bin\rails
    

    And made it point to the correct location for ruby.exe, on my system, like this:

    #!C:\RailsInstaller\Ruby1.9.2\bin\ruby.exe
    

    Et voilà, problem solved!

提交回复
热议问题