一定要在RoR中安装时区支持 - https://github.com/ankane/groupdate#for-mysql

时间:2017-04-01 11:38:53

标签: ruby-on-rails ruby

我想发送展示位置文件,但是当我开始时间并提交按钮时,它会给我一个错误

  

请务必安装时区支持 - https://github.com/ankane/groupdate#for-mysql

我该怎么做才能解决这个问题?

查看

 <%= pie_chart @score[0]%> 
 <%= line_chart Result.group(:name,:percentage).count %> 
 <%= column_chart Result.group(:name,:percentage).count%>
 <%= bar_chart Result.group(:name).group(:percentage).count %>
 <%= line_chart Result.group_by_hour(:created_at).count %>
 <%= line_chart [
{name: "Cantidad de voluntarios en estado activo", data: {Time.new => 20} },
{name: "Study", data: {Time.new => 30} },
{name: "Conversation", data: {Time.new => 50} } ],
{library: {hAxis: {title: "Tiempo", format: 'MMM y'}, vAxis: {title: "Valores"}}} %>

控制器

  def save_test
    @test = params[:question]
    @placement_exam = PlacementExam.find(params[:placement_exam_id])
    @student = Student.find(params[:student_id])
    @score = PlacementExam.calculateres(@test, @placement_exam.id, @student)
  end

1 个答案:

答案 0 :(得分:0)

我知道这很晚了,但是以下内容对我有用:-

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql

输入密码,然后忽略所有错误。

重新启动mysql服务器