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
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.