I have a basic rails application which works on my windows 8 desktop (rails_12factor, ruby 1.9.3, rails 4, postgres) - using rails server
- I am able to navigate to the application website on my local browser and everything renders fine.
I push the application up to heroku via git push heroku master
and everything seems to go fine. The only warning I see is "Removing Gemfile.lock
because it was generated on Windows." The process ends with the following message - "Launching... done, v9".
However on running "heroku ps" I get the following:
=== web (1X): bin/rails server -p $PORT -e $RAILS_ENV
web.1: crashed 2013/07/12 00:42:20 (~ 4s ago)
On doing heroku logs --tail, I get the following being repeated in the log files - :
heroku[web.1]: Starting process with command `bin/rails server -p 16041 -e $RAILS_ENV`
app[web.1]: /usr/bin/env: ruby.exe: No such file or directory
heroku[web.1]: Process exited with status 127
heroku[web.1]: State changed from starting to crashed
heroku[web.1]: Error R99 (Platform error) -> Failed to launch the dyno within 10 seconds
heroku[web.1]: Stopping process with SIGKILL
...
heroku[web.1]: Process exited with status 127
heroku[web.1]: Error R99 (Platform error) -> Failed to launch the dyno within 10 seconds
I saw stuff on the web that had me check .gitignore to see if the contents of my local bin folder were getting excluded. They are not. I also saw suggestions to edit the contents of the bin folder and remove the word .exe after ruby - I tried that as well.
EDIT 1: My project has a subfolder bin, with 3 files bundle, rail and rake. These are the only files which start with #!/usr/bin/env ruby. I also edited the first line to read #!/usr/bin/env ruby*.exe* - the error was still seen. Here is the content of each file :
bundle
#!/usr/bin/env ruby
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
load Gem.bin_path('bundler', 'bundle')
rails
#!/usr/bin/env ruby
APP_PATH = File.expand_path('../../config/application', __FILE__)
require_relative '../config/boot'
require 'rails/commands'
rake
#!/usr/bin/env ruby
require_relative '../config/boot'
require 'rake'
Rake.application.run