【发布时间】:2023-03-31 21:45:01
【问题描述】:
我正在尝试将 RoR 应用程序上传到 Heroku。
操作系统 - Ubuntu,ruby 版本 - 2.2.2p95,rails 版本 - 4.2.1,数据库 - PostgreSQL,通过 BrightBox(树屋教程)安装 RoR,使用 git push heroku master 上传。
在本地服务器应用程序工作正常。当我将它推送到heroku时,它会给出一个错误:
The page you were looking for doesn't exist.
You may have mistyped the address or the page may have moved.
If you are the application owner check the logs for more information.
日志文件说:
/usr/bin/env: ruby2.2: No such file or directory
我已经尝试了所有可能的变体,我可以在 Internet 上找到:
rake rails:update:bin
Remove bin from ~/.gitignore (But there is no such file)
heroku config:set PATH=bin:vendor/bundle/ruby/2.2.2/bin:/usr/local/bin:/usr/bin:/bin
Adding this to the GemFile: ruby '2.2.2'
Changed #!/usr/bin/env ruby2.2(.2 (not sure about ".2")) to #!/usr/bin/env ruby (in bin/rake, bin/bundle and bin/rails)
heroku run rails db:migrate
rake rails:update:bin
ln -s /usr/bin/nodejs /usr/bin/node
要上传到heroku,我已经配置了git,然后登录heroku,然后是“heroku create”,然后是“git push heroku master”,然后是“heroku open”
还有许多其他人...有什么办法可以解决这个问题吗?
【问题讨论】:
标签: ruby-on-rails ruby git postgresql heroku