我的rails應用程序中有反應和引導,並且迄今爲止他們獨立工作的很好。我想通過使用react-bootstrap來組合功能。我正在學習本教程以使其工作:http://react-bootstrap.github.io/getting-started.html。在rails中獲取react-bootstrap工作
我做了CommonJS部分。我在那裏做的:
npm install react
npm install react-bootstrap
在終端中。
然後我去了我的application.js我的資產中的文件,並添加以下代碼: Var Alert = require('react-bootstrap').Alert;
在該線路上的控制檯錯誤以及它說Uncaught ReferenceError: require is not definedapplication.js?body=1:28 (anonymous function)
我該如何要求工作?