Rails 3.1. How to prevent Rails to use CoffeScript?

后端 未结 3 1341
一个人的身影
一个人的身影 2020-12-16 13:50

How do I prevent Rails to enable CoffeeScript and use plain JavaScript instead?

相关标签:
3条回答
  • 2020-12-16 14:20

    Comment out # gem "coffee-script" in your gemfile or just use .js vs .js.coffee files

    0 讨论(0)
  • 2020-12-16 14:37

    Just name your files .js instead of .js.coffee. This is a Tilt naming convention. Similarly, if you don't want to use SCSS, use .css instead of .css.scss. Or if you'd rather use the Sass syntax with semantic whitespace, use .css.sass.

    By default, .js.coffee files are created by certain commands (notably generate controller) as long as gem 'coffee-script' is in the Gemfile, so you'll want to comment that out.

    0 讨论(0)
  • 2020-12-16 14:43

    Comment out gem 'coffee-script' in Gemfile

    0 讨论(0)
提交回复
热议问题