Can't find 'jquery-ui' Rails 3.2

后端 未结 3 1082
清酒与你
清酒与你 2021-01-03 08:26

I have been looking everywhere to figure out this problem. I already downgraded the jquery-rails gem to 2.3.0 in my gemfile. But when I include jquery-ui in application.js I

相关标签:
3条回答
  • 2021-01-03 09:06

    I had a similar issue. The problem was not related to the existing gems but rather with the cached version of them.

    The following steps solved the issue for me:

    1. Specify the actual versions for the affected gems
    2. Clean the asset pipeline by running rake assets:clean
    3. Clean your browser's cache
    4. Start the server again

    This process won't be the same for everyone as the issue here is tied to the cached version of the gems, as I've already mentioned.

    At least it should help find the solution.

    0 讨论(0)
  • 2021-01-03 09:20

    I tried downgrade jquery-rails on my application, That works fine.

    1. Put gem 'jquery-rails', "~> 2.3.0" to Gemfile
    2. Remove Gemfile.lock -> rm Gemfile.lock
    3. Run bundle install
    4. Put //= require jquery-ui to application.js
    Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2013-06-08 13:16:50
     +0700
    Compiled jquery-ui.js  (27ms)  (pid 7016)
    Compiled application.js  (148ms)  (pid 7016)
    Served asset /application.js - 200 OK (213ms)
    

    Could you post your Gemfile ?

    0 讨论(0)
  • 2021-01-03 09:31

    If you are using the jquery-ui-rails gem, you need to use require jquery.ui.all instead of require jquery-ui. If you don't want to use the gem, make sure that you have a jquery-ui.js file in your app/assets/javascripts folder.

    UPDATE

    As of version 5.0.0, use require jquery.ui.

    0 讨论(0)
提交回复
热议问题