Heroku - / usr / bin / env: ruby1.9.1: No such file or directory

I have a rails application, and when I run it locally, it works fine. But when I download my application in Heroku, when I download, I get the following error:

/usr/bin/env: ruby1.9.1: No such file or directory

and this error when requesting the page:

2014-02-03T01:52:52.032866+00:00 heroku[router]: at=error code=H10 desc="App crashed"       method=GET path=/favicon.ico host=whispering-fortress-2710.herokuapp.com request_id=5db8fbf4-2250-4e95-8b99-387f98248f02 fwd="50.148.151.110" dyno= connect= service= status=503 bytes=

Does anyone know how to fix this?

+4
source share
3 answers

I found that besides specifying your ruby ​​version in the Gemfile (use ruby ​​-v will probably return 1.9.3, so add ruby '1.9.3'to the Gemfile), I needed to change the first line the_app / bin / rake, the_app / bin / rails, the_app / bin / bundle.

Line can tell

#!/usr/bin/env ruby1.9.1

Change it to

#!/usr/bin/env ruby

Let me know if this works!

+2

, . , . Do sudo apt-get install ruby, , othervise, . , ! .

+2

specify the version of Ruby to use, added below for the cedar cedar on heroku In the Gemfile add the following line

ruby "1.9.3" # or any other version that you want to use on the heroku stack

0
source

Source: https://habr.com/ru/post/1524987/


All Articles