Ruby on rails Gem在gemlist中,但出现错误:“找不到Gem”

Ruby on rails Gem在gemlist中,但出现错误:“找不到Gem”,ruby-on-rails,ruby,gem,Ruby On Rails,Ruby,Gem,当我尝试使用rails s启动项目时,出现以下错误消息: Could not find gem 'jquery-rails (>= 0) ruby' in the gems available on this machine. Run `bundle install` to install missing gems. 但是,我知道我肯定安装了gem,因为当我输入命令gem list时,它会显示在我的gem列表中 *** LOCAL GEMS *** actionmailer (3.2.

当我尝试使用rails s启动项目时,出现以下错误消息:

Could not find gem 'jquery-rails (>= 0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
但是,我知道我肯定安装了gem,因为当我输入命令gem list时,它会显示在我的gem列表中

*** 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)
我无法使用bundler,因为连接在我的工作场所被阻止,但不管怎样,为什么它会给我一个错误,即安装gem时需要安装gem

编辑:我使用gem环境gemdir查看gems的路径,然后尝试使用bundle config path/installationPath/设置捆绑程序的路径,但仍然有相同的错误


另外,我的Gemfile中gems的版本号也没有问题

Bundler会弄乱gem加载路径。gem列表显示系统上安装了什么,但不一定显示Bundler将向应用程序公开什么。您是否尝试过bundle exec rails s或bundle list来查看Bundler实际公开的是什么?

刚刚尝试了这两种方法,但都得到了相同的错误:在这台计算机上可用的gems中找不到gem'jquery rails>=0 ruby'。听起来jquery rails在Bundler试图从中加载的任何路径中都不可用。检查您的Gemfile.lock;如果您没有运行bundle,它很可能锁定的版本与您系统上的版本不同。jquery rails似乎不受我的文件中任何版本的约束。我认为这可能是一个路径错误,因为当我注释掉jQueryRails时,我已经拥有的其他gem也出现了同样的问题installed@Chris_Heald我使用gem环境gemdir找到了我的安装路径,并使用“bundle config path/installationPath/”将其设置为bundler,但我仍然遇到同样的问题:/