Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/67.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 在Heroku上注册Desive,状态=500_Ruby On Rails_Ruby_Ruby On Rails 4_Heroku_Devise - Fatal编程技术网

Ruby on rails 在Heroku上注册Desive,状态=500

Ruby on rails 在Heroku上注册Desive,状态=500,ruby-on-rails,ruby,ruby-on-rails-4,heroku,devise,Ruby On Rails,Ruby,Ruby On Rails 4,Heroku,Devise,我一整天都在试图解决这个问题,但我弄不明白。我曾经设计过开发,但当我推到Heroku时,它就不起作用了 当我第一次按下代码,网站将加载,我可以看到主页。单击登录链接后,我可以进入/users/sign\u页面 一旦我输入用户详细信息并点击submit,我就会在根URL上看到一个页面,上面写着“很抱歉,出了点问题” 当我在heroku控制台中查看时,用户是被创建的。当我在控制台中删除用户时,我可以再次加载主页 当我跟踪日志时,我得到以下信息: 2015-01-14T03:08:35.973

我一整天都在试图解决这个问题,但我弄不明白。我曾经设计过开发,但当我推到Heroku时,它就不起作用了

当我第一次按下代码,网站将加载,我可以看到主页。单击登录链接后,我可以进入/users/sign\u页面

一旦我输入用户详细信息并点击submit,我就会在根URL上看到一个页面,上面写着“很抱歉,出了点问题”

当我在heroku控制台中查看时,用户是被创建的。当我在控制台中删除用户时,我可以再次加载主页

当我跟踪日志时,我得到以下信息:

    2015-01-14T03:08:35.973477+00:00 heroku[router]: at=info method=GET path="/" host=herokuapp.com request_id=cd15706e-1dcf-4423-9f29-551f47b86cc3 fwd="99.19.1.28" dyno=web.1 connect=0ms service=77ms status=304 bytes=732
2015-01-14T03:08:36.139198+00:00 heroku[router]: at=info method=GET path="/assets/application-1dc4981637a32fd174590c5f8e6c740a.css" host=herokuapp.com request_id=4a355fa8-1792-455f-9d7c-4af22b3592dc fwd="99.19.1.28" dyno=web.1 connect=3ms service=5ms status=304 bytes=133
2015-01-14T03:08:36.169634+00:00 heroku[router]: at=info method=GET path="/assets/application-6d9ad2cbcb5603db021e610fea035881.js" host=herokuapp.com request_id=5907fef4-e1dd-4fe8-a3e8-0741d66b0675 fwd="99.19.1.28" dyno=web.1 connect=2ms service=30ms status=304 bytes=133
2015-01-14T03:08:36.677241+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=herokuapp.com request_id=7f01792c-9cad-4010-89c8-0dd632b99c34 fwd="99.19.1.28" dyno=web.1 connect=17ms service=11ms status=304 bytes=133
2015-01-14T03:14:31.571097+00:00 heroku[router]: at=info method=GET path="/assets/application-6d9ad2cbcb5603db021e610fea035881.js" host=.herokuapp.com request_id=e6fd320f-bb55-41eb-8b7b-d86f9b686a7f fwd="99.19.1.28" dyno=web.1 connect=0ms service=18ms status=304 bytes=133
2015-01-14T03:14:31.393836+00:00 heroku[router]: at=info method=GET path="/" host=herokuapp.com request_id=c58f55fb-93c9-45f5-8729-8732d5447c8b fwd="99.19.1.28" dyno=web.1 connect=5ms service=44ms status=304 bytes=732
2015-01-14T03:14:31.569124+00:00 heroku[router]: at=info method=GET path="/assets/application-1dc4981637a32fd174590c5f8e6c740a.css" host=herokuapp.com request_id=bf530876-0d84-4b94-a0c2-f454b2dcfd99 fwd="99.19.1.28" dyno=web.1 connect=1ms service=11ms status=304 bytes=133
2015-01-14T03:14:31.822101+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=herokuapp.com request_id=c647088e-a020-4fae-96c2-902a5c04de3d fwd="99.19.1.28" dyno=web.1 connect=3ms service=5ms status=304 bytes=133
2015-01-14T03:16:05.917921+00:00 heroku[router]: at=info method=GET path="/users/sign_up" host=herokuapp.com request_id=bdb7264e-cf0a-470d-849f-0456b21fdfc5 fwd="99.19.1.28" dyno=web.1 connect=2ms service=20ms status=200 bytes=4637
2015-01-14T03:16:20.955668+00:00 heroku[router]: at=info method=POST path="/users" host=herokuapp.com request_id=19bf8082-f7fb-49bf-872c-54e31dee72cf fwd="99.19.1.28" dyno=web.1 connect=1ms service=182ms status=302 bytes=1192
2015-01-14T03:16:21.090669+00:00 heroku[router]: at=info method=GET path="/" host=herokuapp.com request_id=8741d387-1953-4f7d-ace8-48736db9a500 fwd="99.19.1.28" dyno=web.1 connect=1ms service=53ms status=500 bytes=1754
我已经做了heroku rake db:迁移一百万次了

我还能做些什么来尝试和弄清楚发生了什么

我还设计了:暂时可以确认

ruby“2.1.5” 轨道“4.1.8” 设计3.4.1 坎坎坎1.9.2

这些有帮助吗

2015-01-14T04:09:45.064882+00:00 heroku[web.1]: State changed from up to starting
2015-01-14T04:09:46.978100+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2015-01-14T04:09:47.441918+00:00 app[web.1]:    /app/vendor/ruby-2.1.5/lib/ruby/2.1.0/webrick/server.rb:170:in `select'
2015-01-14T04:09:47.441912+00:00 app[web.1]: [2015-01-14 04:09:47] FATAL SignalException: SIGTERM
2015-01-14T04:09:47.441940+00:00 app[web.1]:    /app/vendor/ruby-2.1.5/lib/ruby/2.1.0/webrick/server.rb:170:in `block in start'
2015-01-14T04:09:47.441942+00:00 app[web.1]:    /app/vendor/ruby-2.1.5/lib/ruby/2.1.0/webrick/server.rb:32:in `start'
2015-01-14T04:09:47.441946+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:14:in `run'
2015-01-14T04:09:47.441947+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/server.rb:264:in `start'
2015-01-14T04:09:47.441944+00:00 app[web.1]:    /app/vendor/ruby-2.1.5/lib/ruby/2.1.0/webrick/server.rb:160:in `start'
2015-01-14T04:09:47.441954+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:76:in `server'
2015-01-14T04:09:47.441960+00:00 app[web.1]:    bin/rails:8:in `<main>'
2015-01-14T04:09:47.441955+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
2015-01-14T04:09:47.441950+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:81:in `block in server'
2015-01-14T04:09:47.441949+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/commands/server.rb:69:in `start'
2015-01-14T04:09:47.441957+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/commands.rb:17:in `<top (required)>'
2015-01-14T04:09:47.481089+00:00 app[web.1]: => Rails 4.1.8 application starting in production on http://0.0.0.0:21786
2015-01-14T04:09:47.481093+00:00 app[web.1]: => Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
2015-01-14T04:09:47.481095+00:00 app[web.1]: => Ctrl-C to shutdown server
2015-01-14T04:09:47.481096+00:00 app[web.1]: Exiting
2015-01-14T04:09:47.481084+00:00 app[web.1]: => Booting WEBrick
2015-01-14T04:09:47.441958+00:00 app[web.1]:    bin/rails:8:in `require'
2015-01-14T04:09:47.441966+00:00 app[web.1]: [2015-01-14 04:09:47] INFO  going to shutdown ...
2015-01-14T04:09:47.441952+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:76:in `tap'
2015-01-14T04:09:47.441968+00:00 app[web.1]: [2015-01-14 04:09:47] INFO  WEBrick::HTTPServer#start done.
2015-01-14T04:09:47.481091+00:00 app[web.1]: => Run `rails server -h` for more startup options
2015-01-14T04:09:48.198859+00:00 heroku[web.1]: Process exited with status 143
2015-01-14T04:09:50.097709+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 24511 -e production`
2015-01-14T04:09:54.054846+00:00 app[web.1]: [2015-01-14 04:09:54] INFO  ruby 2.1.5 (2014-11-13) [x86_64-linux]
2015-01-14T04:09:54.054823+00:00 app[web.1]: [2015-01-14 04:09:54] INFO  WEBrick 1.3.1
2015-01-14T04:09:54.055225+00:00 app[web.1]: [2015-01-14 04:09:54] INFO  WEBrick::HTTPServer#start: pid=2 port=24511
2015-01-14T04:09:54.626003+00:00 heroku[web.1]: State changed from starting to up
2015-01-14T04:09:45.064882+00:00 heroku[web.1]:状态从启动更改为启动
2015-01-14T04:09:46.978100+00:00 heroku[web.1]:停止使用SIGTERM的所有进程
2015-01-14T04:09:47.441918+00:00应用程序[web.1]:/app/vendor/ruby-2.1.5/lib/ruby/2.1.0/webrick/server.rb:170:在“选择”中
2015-01-14T04:09:47.441912+00:00应用程序[web.1]:[2015-01-14 04:09:47]致命信号异常:SIGTERM
2015-01-14T04:09:47.441940+00:00应用程序[web.1]:/app/vendor/ruby-2.1.5/lib/ruby/2.1.0/webrick/server.rb:170:“开始时阻塞”
2015-01-14T04:09:47.441942+00:00应用程序[web.1]:/app/vendor/ruby-2.1.5/lib/ruby/2.1.0/webrick/server.rb:32:in'start'
2015-01-14T04:09:47.441946+00:00 app[web.1]:/app/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:14:in'run'
2015-01-14T04:09:47.441947+00:00应用程序[web.1]:/app/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/server.rb:264:在“开始”中
2015-01-14T04:09:47.441944+00:00应用程序[web.1]:/app/vendor/ruby-2.1.5/lib/ruby/2.1.0/webrick/server.rb:160:in'start'
2015-01-14T04:09:47.441954+00:00 app[web.1]:/app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:76:“服务器”中
2015-01-14T04:09:47.441960+00:00应用程序[web.1]:bin/rails:8:in`'
2015-01-14T04:09:47.441955+00:00 app[web.1]:/app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:40:in'run_command!'
2015-01-14T04:09:47.441950+00:00应用程序[web.1]:/app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:81:“服务器中的块”中
2015-01-14T04:09:47.441949+00:00 app[web.1]:/app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/commands/server.rb:69:“开始”
2015-01-14T04:09:47.441957+00:00应用程序[web.1]:/app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/commands.rb:17:in`'
2015-01-14T04:09:47.481089+00:00应用程序[web.1]:=>Rails 4.1.8应用程序在http://0.0.0.0:21786
2015-01-14T04:09:47.481093+00:00应用程序[web.1]:=>注意:服务器正在侦听所有接口(0.0.0.0)。考虑使用127.0.0.1(-绑定选项)
2015-01-14T04:09:47.481095+00:00应用程序[web.1]:=>Ctrl-C关闭服务器
2015-01-14T04:09:47.481096+00:00应用程序[网站1]:退出
2015-01-14T04:09:47.481084+00:00应用程序[web.1]:=>启动WEBrick
2015-01-14T04:09:47.441958+00:00应用程序[web.1]:bin/rails:8:in'require'
2015-01-14T04:09:47.441966+00:00应用程序[web.1]:[2015-01-14 04:09:47]信息将关闭。。。
2015-01-14T04:09:47.441952+00:00 app[web.1]:/app/vendor/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:76:in'tap'
2015-01-14T04:09:47.441968+00:00应用程序[web.1]:[2015-01-14 04:09:47]信息WEBrick::HTTPServer#启动完成。
2015-01-14T04:09:47.481091+00:00应用程序[web.1]:=>运行“rails服务器-h”以获取更多启动选项
2015-01-14T04:09:48.198859+00:00 heroku[web.1]:进程退出,状态为143
2015-01-14T04:09:50.097709+00:00 heroku[web.1]:使用命令“bin/rails server-p 24511-e production”启动流程`
2015-01-14T04:09:54.054846+00:00应用程序[web.1]:[2015-01-14 04:09:54]信息ruby 2.1.5(2014-11-13)[x86_64-linux]
2015-01-14T04:09:54.054823+00:00应用程序[web.1]:[2015-01-14 04:09:54]信息WEBrick 1.3.1
2015-01-14T04:09:54.055225+00:00应用程序[web.1]:[2015-01-14 04:09:54]信息WEBrick::HTTPServer#启动:pid=2端口=24511
2015-01-14T04:09:54.626003+00:00 heroku[web.1]:状态从启动更改为启动

由于您的用户正在创建,这使我相信Desive可能工作正常,并且错误实际上在根视图的代码中。再次检查您是否正在尝试从尚未分配的用户调用属性。例如,在登录后主页上的大多数应用程序中,您可能会在顶部看到一条消息,上面写着“Welcome back Jim”,如果您没有使用“first_name”属性创建用户对象,它将被设置为nil,并且用nil值插入该字符串将抛出500错误

由于代码的演变,在编写在根视图上引发错误的代码之前,通过为导致问题的属性指定一个值,您可能没有在开发中引发此错误


仔细检查您的代码,查看根页面调用的用户的任何属性,这些属性在创建用户时未分配。

将开发环境设置为heroku,并查看错误堆栈跟踪。Desive的哪个版本,你在用ruby等吗?@Masud我该怎么做?@heading_to_tahiti我添加了版本号。如果您还需要其他信息,请告诉我。
heroku config:set RAILS_ENV=development
Yeah,当我从heroku控制台删除用户并重新加载页面时,我会在网站的“提醒/通知”部分看到“欢迎!您已成功注册”。因此,Desive似乎正在发挥作用。我将编辑根URL属性并返回报告。谢天谢地,我从主页上删除了所有内容,只转到了/users/sign\u url。一旦我注册了,我仍然是g