2016-09-19 65 views
0

我的目标实现Scrivito测试应用程序并将其部署到Heroku的。我能够成功地推送到Heroku,但是当我打开Heroku应用程序时,在我的Heroku日志中收到以下错误。Heroku的应用程序不启动(没有这样的文件或目录/ usr/bin中/ ENV:红宝石),Unbuntu

2016-09-19T18:02:37.970943+00:00 heroku[web.1]: State changed from crashed to starting 
2016-09-19T18:02:43.815636+00:00 heroku[web.1]: Starting process with command "bin/rails server -p 44169 -e production" : No such file or directory00:00 app[web.1]: /usr/bin/env: ruby 
2016-09-19T18:02:45.897524+00:00 heroku[web.1]: Process exited with status 127 
2016-09-19T18:02:45.913351+00:00 heroku[web.1]: State changed from starting to crashed 
2016-09-19T18:21:39.994431+00:00 heroku[api]: Release v10 created by [email protected] 
2016-09-19T18:21:39.994242+00:00 heroku[api]: Deploy 72a4fb2 by [email protected] 
2016-09-19T18:21:40.329657+00:00 heroku[web.1]: State changed from crashed to starting 
2016-09-19T18:21:40.846263+00:00 heroku[slug-compiler]: Slug compilation started 
2016-09-19T18:21:40.846272+00:00 heroku[slug-compiler]: Slug compilation finished 
2016-09-19T18:21:52.697002+00:00 heroku[web.1]: Starting process with command "bin/rails server -p 5064 -e production": No such file or directory00:00 app[web.1]: /usr/bin/env: ruby 
2016-09-19T18:21:54.219622+00:00 heroku[web.1]: Process exited with status 127 
2016-09-19T18:21:54.249853+00:00 heroku[web.1]: State changed from starting to crashed 
2016-09-19T18:21:54.250802+00:00 heroku[web.1]: State changed from crashed to starting 
2016-09-19T18:21:59.216745+00:00 heroku[web.1]: Starting process with command "bin/rails server -p 17564 -e production": No such file or directory00:00 app[web.1]: /usr/bin/env: ruby 
2016-09-19T18:22:01.412414+00:00 heroku[web.1]: Process exited with status 127 
2016-09-19T18:22:01.457536+00:00 heroku[web.1]: State changed from starting to crashed 
2016-09-19T18:22:02.108887+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=scrivitoexampleapp.herokuapp.com request_id=b46afd2a-7fc1-462f-acd5-876551be1aa3 fwd="70.171.137.175" dyno= connect= service= status=503 bytes= 
2016-09-19T18:22:02.400312+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=scrivitoexampleapp.herokuapp.com request_id=d5321dcc-56f0-474a-a7c3-8ff420ad851b fwd="70.171.137.175" dyno= connect= service= status=503 bytes= 

“USR /斌/ env的红宝石” 的四个文件被发现在我的应用程序:

​​

我的Gemfile:

source 'https://rubygems.org' 
ruby "2.3.0" 

gem 'autoprefixer-rails' 
gem 'bootstrap-sass' 
gem 'dotenv-rails' 
gem 'jbuilder', '~> 2.0' 
gem 'jquery-rails' 
gem 'rails', '4.2.6' 
gem 'sass-rails', '~> 5.0' 
gem 'scrivito', '1.5.1' 
gem 'scrivito_advanced_editors' 
gem 'secure_headers' 
gem 'uglifier', '>= 1.3.0' 

group :development do 
    gem 'web-console' 
    gem 'listen', '~> 3.0.5' 
end 

group :production do 
    gem 'pg' 
    gem 'rails_12factor' 
end` 

我在Windows 10上运行的Ubuntu 14.04。

我想知道,如果这是与事实,我最近更新到Rails 5做的,但Scrivito尚不支持它。我推送到Heroku,无论是否有指定的Ruby版本,都认为这是问题所在。关于这个话题的其他问题似乎没有解决我的问题。

在此先感谢!

+0

**更新:** 我推一个更新的Gemfile到现在的Heroku,其中包括红宝石2.3.1。 当我运行'heroku run“ruby -v”'我收到结果:'ruby 2.3.1p112(2016-04-26 revision 54768)[x86_64-linux]'。 Heroku中仍然出现错误。 – lltheis

回答

0

尝试切换到ruby 2.3.1和运行heroku run "ruby -v"确保版本匹配。

+0

对不起,@ cema-sp,我对这一切都很新颖 - 你能否澄清我如何切换到ruby 2.3.1?我现在已经安装了它(我没有意识到Ruby不会使用'bundle update'自动更新。 – lltheis

+0

你可以使用[rbenv](https://github.com/rbenv/rbenv),它很容易安装和使用。捆扎机只更新宝石。 无论如何,尝试运行'Heroku上运行“红宝石-v”'你的Heroku项目目录,检查服务器上的红宝石版本,它应该是2.3.1 AFAIK。 –

1

我发现了问题,这一切是在我的Windows /流浪的环境,在bin文件夹换行符进行混合。我跑了rake rails:update:bin并推动了所有的变化,在Heroku上运行!

0

我试过这个命令和固定这个问题对我来说

$ dos2unix bin/bundle bin/rake bin/rails 
相关问题