I'm currently trying to setup cronjobs using whenever on an AWS server, but when i try to run the script/rails file I get the following message:
-bash: script/rails: /usr/bin/ruby^M: bad interpreter: No such file or directory
While the script/rails file contains the following:
#!/usr/bin/ruby
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
APP_PATH = File.expand_path('../../config/application', __FILE__)
require File.expand_path('../../config/boot', __FILE__)
require 'rails/commands'
It looks like to me for whatever reason an extra ^M is being appended to the first line. Also note that I'm developing on windows and deploying to an AWS ubuntu server. Does anyone have an idea of how I can fix this issue? I'm trying to give as much guidance as i can, but this is a weird problem. Note: I tried just creating the file on the ubuntu machine through ssh but it then tries to execute rails itself when i do script/rails. Thanks, Cody