Im learning ruby on rails for a module and class and following a tutorial. When I try to install a gem like this: gem simple-navigation (or gem "simple-navigation") I get this error
ERROR while executing gem ... (Gem:CommandLineError)
unknown command simple-navigation
This happens with all gems. gem install simple-navigation works, however doesnt install when i run bundle install. I have to manually add it to the gemfile to get it to work.
Anyone know why this is happening? Using Ruby 2.00 and Rails 4
This is intended behavior. gem install simple-navigation
will work correctly to install a gem for ruby, but to install a gem for your rails application, you need to add the gem to your Gemfile and then run bundle install
instead of just running the gem install
command.
You are getting the error you posted because you are running gem simple-navigation
, and that is not a command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With