生产环境下编辑Rails的md_simple_editor gem及加载问题修复
Fix: md_simple_editor Only Loads After Page Refresh
Hey there, I ran into the exact same issue with the md_simple_editor Rails gem where it wouldn't load unless I refreshed the page. Here's how I fixed it locally:
- Locate the gem's CoffeeScript file on your machine:
The path for me was/usr/local/rvm/gems/ruby-2.3.4/gems/md_simple_editor-0.3.0/app/assets/javascripts/md_simple_editor.js.coffee - Apply the code changes suggested by other users in the gem's issue thread that addresses this refresh problem.
Once you've made the local edit, the editor should load properly without needing a page refresh. If you want to make this fix permanent for your project (so you don't have to reapply it every time you run bundle install), consider forking the gem repository, pushing your changes to your fork, and updating your Gemfile to point to your forked version like this:
gem 'md_simple_editor', github: 'your-username/md_simple_editor'
内容的提问来源于stack exchange,提问作者Joao Quaresma
相关产品推荐
相关产品推荐

