Skip to content

Common Issues & Errors

Mirv edited this page Nov 2, 2017 · 2 revisions

For trouble shooting help, please see the end ...

Entries not saving - also known as "Mass assignment protection", or "Strong Param(s)" / "Strong Parameters"

There are mass assignment checks in rails. Rails 4 & 5 use Strong Parameters. Older versions of Rails used attr_accessible.

How to recognize

Jquery problems

Just because Cocoon gem is adding / removing fields, does not mean that the Jquery library is working. With Jquery, there's 5 or 6 places it can go wrong OR everything can be "right", but duplicate code base can cause conflicts.

How to recognize

  • You can see buttons/tabs/links, but click something & nothing happens
  • Not everything you programmed is happening
  • Other Jquery stuff (bootstrap, widgets, etc) stop working
  • You might or might not see your assets in the Chrome web console in the elements section
  • If you try logging something to the web browser console, it doesn't show up

Classes of Jquery issues

  • Rails asset pipe line - assets not loading (in webconsole)

    • lack of javascript_include_tag
    • too many gemfile entries of the different Jquery libraries
    • Use of CDN alongside gemfile or Jquery file stored on your server in `app/assets/javascript or even <script> in the views
    • javascript_include_tag not side the header or header tag not closed
    • lack of //= . at the end of the application.js
    • your files are not in the app/assets/javascript directory to be included
    • new changes aren't being reflected in the Chrome web browser elements or the code base via web
    • automatically generated .coffee files in the assets directory, conflicting with .js files if you don't use coffeescript
    • Sporadic or random issues
  • Non-responsive / Conflicts

    • Duplicates of the Jquery source files
      • Slow loads
      • Sudden flashes or effects
      • Most of the time there is no sign, your cocoon fields will appear, but none of the effects will work

Resources ...