windows heroku run rake db:migrate error “/usr/bin/env: ruby.exe: No such file or directory”

后端 未结 5 604
清歌不尽
清歌不尽 2020-11-27 21:18

I\'m pretty new to Rails here and I\'ve followed Ruby on Rails Tutorial for most of it. I have since decided to make my own application, but using the Rails 4 gem in beta. I

5条回答
  •  清歌不尽
    2020-11-27 21:56

    I had a similar issue and as others have already stated, changing the below helped.

    #!/usr/bin/env ruby.exe to #!/usr/bin/env ruby

    However, I also needed to remove some hidden carriage returns which were still present from developing on Windows originally (I guess?).

    I used dos2unix to do this.

    dos2unix bin/bundle bin/rake bin/rails
    

    After that, I committed my changes, pushed to heroku and all was good.

提交回复
热议问题