Reputation: 23
I am trying to add jQuery to my rails project by using this command:
gem 'jquery-rails'
and I am receiving this error :
ERROR: While executing gem ... (Gem::CommandLineError)
Unknown command jquery-rails
Thanks in advance for any ideas on how to get this to work.
Upvotes: 2
Views: 615
Reputation: 308
in gem file
gem 'jquery-rails'
OR in terminal
gem install jquery-rails
then bundle install
in app/assets/javascripts/application.js:
//= require jquery
//= require bootstrap-sprockets
Upvotes: 2
Reputation: 1002
gem 'jquery-rails'
is not a command.
Add this line to your Gemfile and then run command: bundle install
OR
You can also install this gem by running command: gem install jquery-rails
Upvotes: 3