Gem is in gemlist but getting error: “Could not find gem”

When I try to start my project using rails s I have the following
error message occur:

Could not find gem 'jquery-rails (>= 0) ruby' in the gems available

on this machine.
Run bundle install to install missing gems.

However, I know I definitely have that gem installed because when I put
in the command gem list it shows up in my list of gems.

*** LOCAL GEMS ***

actionmailer (3.2.3)
actionpack (3.2.3)
activemodel (3.2.3)
activerecord (3.2.3)
activeresource (3.2.3)
activesupport (3.2.14, 3.2.3)
arel (3.0.2)
bigdecimal (1.1.0)
builder (3.2.2, 3.0.0)
bundler (1.1.5)
c2c_linux_patch_utilities (0.30.0, 0.29.0)
chef (11.6.2)
chef-zero (1.6)
debug_me (0.5.1)
diff-lcs (1.1.3)
erubis (2.7.0)
gelf (1.1.3)
hashie (2.0.5)
highline (1.6.19)
hike (1.2.1)
i18n (0.6.5)
io-console (0.3)
ipaddress (0.8.0)
journey (1.0.3)
jquery-rails (2.0.1)
json (1.7.7, 1.5.5)
knife-lastrun (0.0.4)
mail (2.4.4)
mime-types (1.25)
minitest (3.2.0, 2.5.1)
mixlib-authentication (1.3.0)
mixlib-cli (1.3.0)
mixlib-config (1.1.2)
mixlib-log (1.6.0)
mixlib-shellout (1.2.0)
moneta (0.6.0)
multi_json (1.8.1)
net-ssh (2.7.0)
net-ssh-gateway (1.2.0)
net-ssh-multi (1.2.0, 1.1)
ohai (6.18.0)
polyglot (0.3.3)
pony (1.4, 1.3)
poseidon (0.0.4)
puma (1.6.3)
rack (1.5.2, 1.4.1)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.3)
railties (3.2.3)
rake (10.1.0, 0.9.2.2)
rdoc (3.12.2, 3.9.5)
rest-client (1.6.7)
rspec (2.12.0)
rspec-core (2.12.2)
rspec-expectations (2.12.1)
rspec-mocks (2.12.2)
rspec_junit_formatter (0.1.6)
ruby-shadow (2.2.0)
sdoc (0.3.20)
simplecov (0.7.1)
simplecov-html (0.7.1)
sprockets (2.3.1, 2.1.2)
systemu (2.5.2, 2.5.1)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.31)
xml-simple (1.1.1)
yajl-ruby (1.1.0)

To further investigate, I’ve also tried the commands bundle exec rails s and bundle list to see what Bundler is actually exposing, but got
the same error for both

Could not find gem ‘jquery-rails (>= 0) ruby’ in the gems available
on
this machine.

I’m not able to use bundler because the connection is blocked at my
workplace, but regardless, why is it giving me the error that the gem
needs to be installed when it is installed?

The jquery rails gem installed in your machine is not the that Gemfile
needs. To confirm this, open Gemfile.lock. search for jquery-rails.
you’ll
find the gem version. compare it with the one in your machine.

Cheers

On 15 January 2015 at 23:18, Beckah Zz [email protected] wrote:


I’m not able to use bundler because the connection is blocked at my
workplace, but regardless, why is it giving me the error that the gem
needs to be installed when it is installed?

To run bundle when you do not have a connection the command is something
like
bundle install --local
to tell it to pick up only locally installed gems. I am not sure of
the exact command however, possibly someone else can confirm or you
will have to research it.
Obviously it is up to you to make sure you have installed the correct
versions of the gems before running bundle in this way.

Colin