Ruby on rails 导轨5中的CKEditor,don';不显示工具栏

Ruby on rails 导轨5中的CKEditor,don';不显示工具栏,ruby-on-rails,image,ckeditor,toolbar,Ruby On Rails,Image,Ckeditor,Toolbar,将CKEdito添加到Rails项目。它工作了,但工具栏没有显示 Gemfile _form.html.erb <div class="form-group"> <%= f.label :body%> <%= f.cktext_area :body, class: 'form-control'%> </div> post_controller.eb def更新 if @post.update_attributes(post_pa

将CKEdito添加到Rails项目。它工作了,但工具栏没有显示

Gemfile

_form.html.erb

<div class="form-group">
    <%= f.label :body%>
    <%= f.cktext_area :body, class: 'form-control'%>
</div>
post_controller.eb

def更新

if @post.update_attributes(post_params)
  redirect_to @post, success: "Saved!"
else 
  flash[:danger] = "Not Saved!"
  render :edit
end   end
def销毁

@post.destroy

redirect_to posts_path, success: "Deleted!"   end
私人的

def post_params
  params.require(:post).permit(:title, :summary, :body, :image) #image add by gem magick
end
def set_post
  @post = Post.find(params[:id])
end end

谢谢

在您的应用程序
app/assets/javascripts/application.js中添加以下行。这是对js初始值设定项的调用。它将加载应用程序的ckeditor工具

//= require ckeditor/init

错误…在ckeditor github页面上没有关于这行代码链轮的任何消息::在帖子中找不到FileNotFound#new无法为我的应用程序找到类型为“application/javascript”的文件“ckeditor/init”。您在哪个文件中添加了“require ckeditor/init”,请对您的代码添加一些解释,以便其他人可以从中学习-该行的作用是什么?更新了答案。@RajkumarUlaganadhan您使用的Rails版本是什么?
@post.destroy

redirect_to posts_path, success: "Deleted!"   end
def post_params
  params.require(:post).permit(:title, :summary, :body, :image) #image add by gem magick
end
def set_post
  @post = Post.find(params[:id])
end end
//= require ckeditor/init