下载数据表的最简单方法是什么?

时间:2019-01-07 15:48:18

标签: ruby-on-rails datatables

我正在研究https://datatables.net/manual/installation上安装DataTables的各种方法,而使用bower的方法对我来说是最简单的。所以我尝试先使用npm

安装Bower
npm install bower

但是我得到了这些警告:

npm WARN deprecated bower@1.8.4: We don't recommend using Bower for new projects. Please consider Yarn and Webpack or Parcel. You can read how to migrate legacy project here: https://bower.io/blog/2017/how-to-migrate-away-from-bower/
npm WARN rm not removing /Users/biju/workspace/rails/movie_db/node_modules/.bin/semver as it wasn't installed by /Users/biju/workspace/rails/movie_db/node_modules/semver
npm WARN rm not removing /Users/biju/workspace/rails/movie_db/node_modules/.bin/nopt as it wasn't installed by /Users/biju/workspace/rails/movie_db/node_modules/nopt
npm WARN rm not removing /Users/biju/workspace/rails/movie_db/node_modules/fsevents/node_modules/.bin/node-pre-gyp as it wasn't installed by /Users/biju/workspace/rails/movie_db/node_modules/fsevents/node_modules/node-pre-gyp
npm WARN rm not removing /Users/biju/workspace/rails/movie_db/node_modules/.bin/browserslist as it wasn't installed by         /Users/biju/workspace/rails/movie_db/node_modules/browserslist
npm notice created a lockfile as package-lock.json. You should commit this file.
+ bower@1.8.4
added 1 package and removed 1100 packages in 14.042s

最后,上述步骤没有安装bower,当我运行bower安装datatbles时:

bower install --save datatables.net 

我收到此错误:

-bash: bower: command not found

我想知道bower是否已过时并被yarn取代,那么datatables网站为何显示有关如何使用yarn进行安装的说明? / p>

关于使用最少步骤安装DataTables的任何技巧吗?

1 个答案:

答案 0 :(得分:1)

您是否尝试过使用该宝石? https://github.com/mkhairi/jquery-datatables