env: ruby\r: No such file or directory

后端 未结 4 740
失恋的感觉
失恋的感觉 2021-02-08 15:52

I have Rails project. When I try to run any rake task or rails server it give me this error

env: ruby\\r: No such file or directory

4条回答
  •  太阳男子
    2021-02-08 16:34

    You probably have edited ./bin/rake file and added \r at the end of first line:

    #!/usr/bin/env ruby
    begin
      load File.expand_path("../spring", __FILE__)
    rescue LoadError
    end
    require_relative '../config/boot'
    require 'rake'
    Rake.application.run
    

    Make sure that after "ruby" you have only new line char.

提交回复
热议问题