Reputation: 2380
I added the line to the gem file:
gem 'bootstrap-sass' '3.3.2.0'
then I got:
$ bundle install
Fetching gem metadata from https://rubygems.org/...........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Could not find gem 'bootstrap-sass3.3.2.0 (>= 0) ruby' in the gems available on this machine.
so I downloaded and installed it from rubygems.org:
$ gem install bootstrap-sass -v 3.3.2.0
Fetching: autoprefixer-rails-5.1.11.gem (100%)
Successfully installed autoprefixer-rails-5.1.11
Fetching: bootstrap-sass-3.3.2.0.gem (100%)
Successfully installed bootstrap-sass-3.3.2.0
2 gems installed
Then tried:
$bundle install
or/and
$bundle update
And still getting the message:
Could not find gem 'bootstrap-sass3.3.2.0 (>= 0) ruby' in the gems available on this machine.
What should I do?
Upvotes: 1
Views: 552
Reputation: 126
If you are installing any gem with perticular version you should have to give a comma in between gem and version (or any other parameter its optional). like,
gem 'bootstrap-sass','3.3.2.0'
but if you want to install only gem without any version you need to give only gem file name,that enough
like,
gem 'bootstrap-sass'
The benefit of above declaring gem is that it's version independent,because bundle installer will automatically download latest version gem, for our project.
In the below code you can see that i used Rails with 4.2.1 version and i separated with it comma, but for further gems I did not mentioned any version. so bundle installer will automatically install latest version for you are Rails project.
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
Upvotes: 3
Reputation: 1387
You forgot the comma between gem name, and version.
gem 'bootstrap-sass', '3.3.2.0'
Refer to the documentation, you need to specify your optional parameters separated by ,
.
Upvotes: 5