我正尝试将RoR应用程序上传到Heroku。在Heroku上部署Ruby on Rails
操作系统 - Ubuntu,ruby版本 - 2.2.2p95,rails版本 - 4.2.1,数据库 - PostgreSQL,通过BrightBox(教程从treehouse)安装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
我已经尝试了所有可能的方案,我可以在互联网上找到:
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创建”,即“混帐推Heroku的主”后,然后在“打开的Heroku”
等等......任何想法如何解决这个问题?
我已经安装了它,但它没有改变任何东西。我不确定你写的第二行。我在哪里可以找到它?感谢您的答复。 –
而实际上它是rails_12factor –
是的,抱歉的错字。第二行应该在你的config/environments/production.rb文件中。 –