首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何让jquery-cookie插件与Rails5协同工作?

如何让jquery-cookie插件与Rails5协同工作?
EN

Stack Overflow用户
提问于 2017-01-05 23:56:29
回答 0查看 1.1K关注 0票数 1

我想使用Rails 5.0.1,并且我的应用程序中还需要jQuery cookie插件。我已经在我的Gemfile中包含了这个

代码语言:javascript
复制
gem 'jquery-cookie-rails'

但是自从我更改了我的Rails dependency to 5.0.1,我现在运行bundle install时就会得到这个错误...

代码语言:javascript
复制
localhost:myproject davea$ bundle install
Your Gemfile lists the gem pg (>= 0) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of one of them later.
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "railties":
  In snapshot (Gemfile.lock):
    railties (= 5.0.1)

  In Gemfile:
    coffee-rails was resolved to 4.2.1, which depends on
      railties (< 5.2.x, >= 4.0.0)

    jquery-cookie-rails was resolved to 0.1.1, which depends on
      railties (< 5.0, >= 3.2.0)

    jquery-rails was resolved to 4.2.1, which depends on
      railties (>= 4.2.0)

    jquery-turbolinks was resolved to 2.1.0, which depends on
      railties (>= 3.1.0)

    jquery-ui-rails was resolved to 6.0.1, which depends on
      railties (>= 3.2.16)

    rails (~> 5.0.1) was resolved to 5.0.1, which depends on
      railties (= 5.0.1)

    sass-rails was resolved to 5.0.6, which depends on
      railties (< 6, >= 4.0.0)

    web-console was resolved to 3.4.0, which depends on
      railties (>= 5.0)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

我怎么能既吃蛋糕又吃蛋糕呢?我想使用最新版本的Rails,还想使用jQuery-cookie。我该怎么做呢?

EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41489335

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档