While Executing Gem, Unknown Command

While executing gem, unknown command

gem isn't lying to you, they aren't valid gem commands.

Perhaps you're confusing the command line with Bundler? For example, adding

gem "tilt"

to a Gemfile and running bundle install will install tilt. But Bundler uses its own syntax, and isn't a shell script. To install tilt using the gem binary directly you'd have to do:

gem install tilt

Running gem help will give you a list of gem's command line arguments.

Ruby and Rails gem install issues

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.

ERROR: While executing gem

Use rbenv to setup a ruby binary that is in your home dir (a writable path).

You get that error because you lack write permissions to the System dir. Don't try to get write perms there - that's just asking for trouble. Instead, install a ruby version manager.

rbenv is linked above. Some like RVM. You can google for the arguments that pro/con each. rbenv is "more unix-like" and that is a good reason on its own.

Unable to install jQuery gem to rails

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

Receiving error when installing bootstrap-sass gem in my ruby on rails app

As CD-RUM stated, you will need to add both the gem bootstrap-sass & gem sass-rails in to your Gemfile. I would also suggest adding gem 'sprockets', '2.11.0' as well since the newer version of sprockets that comes with rails 5 has had some issues working well with Bootstrap. Then run bundle install.

You will also want to rename your application.css file to application.scss
and add the import files (@import "bootstrap-sprockets" & @import "bootstrap") there . Now restart your server.

Read through the Ruby on Rails installation instructions here: bootsrap-sass gem & if you're still having issues consider changing the version of the bootstrap-sass gem to an earlier version (I use gem 'bootstrap-sass', '~> 3.3.5.1') since some people seem to experience version conflicts.



Related Topics



Leave a reply



Submit