小编mga*_*han的帖子

jQuery UI Droppable Uncaught TypeError

很难调试这个.

在使用CoffeeScript的Backbone应用程序中使用jQuery UI Droppable.

功能没有任何问题,一切都按照我的意图进行,但每次删除项目时我仍然会收到此控制台错误.

Uncaught TypeError: Cannot read property 'options' of undefined
Run Code Online (Sandbox Code Playgroud)

droppable的代码:

@$el.droppable
        tolerance: 'pointer'
        hoverClass: 'drop_hover'
        accept: '.item'

        drop: (e, ui) =>
            draggedItem = ui.draggable

            itemId = draggedItem.attr 'data-id'

            allInstances = @model.collection.models

            findItems = for instance in allInstances
                          instanceItems = instance.get 'items'
                          instanceItems.getByCid itemId


            compacted = _.compact findItems

            droppedItem = compacted[0]

            droppedCollection = droppedItem.collection

            droppedCollection.remove droppedItem if _.include droppedCollection.models, droppedItem

            @itemCollection.add droppedItem unless _.include @items, droppedItem
Run Code Online (Sandbox Code Playgroud)

就像我说功能正常工作一样,如果有人知道我可以尝试调试的话,我只想摆脱错误.

堆栈跟踪

Uncaught TypeError: Cannot read property 'options' of undefined
a.ui.plugin.add.stopjquery-ui.js:49 …
Run Code Online (Sandbox Code Playgroud)

drag-and-drop jquery-ui coffeescript backbone.js

9
推荐指数
3
解决办法
6844
查看次数

乘客NGINX模块失败

有一次,我的系统运行正常,NGINX,Rails和Passenger.

昨天我做了一个全新的Passenger安装,现在passenger-install-nginx-module失败了.

    /Users/mgaughan/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/passenger-3.0.13/ext/nginx/../common/libpassenger_common.a /Users/mgaughan/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/passenger-3.0.13/ext/nginx/../common/libboost_oxt.a -lstdc++ -       lpthread -lm -lpcre -lssl -lcrypto -lz
Undefined symbols for architecture x86_64:
 "_pcre_free_study", referenced from:
  _ngx_pcre_free_studies in ngx_regex.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[1]: *** [objs/nginx] Error 1
make: *** [build] Error 2
Run Code Online (Sandbox Code Playgroud)

昨天在ServerFault上发布了这个确切的问题,但我认为这更有可能在这里得到解答(如果这是一个问题,我道歉).

https://serverfault.com/questions/399304/cannot-install-phusion-passenger-3-0-13-with-nginx-1-2-1

谢谢你的帮助.

ruby-on-rails passenger nginx

8
推荐指数
2
解决办法
2179
查看次数

jQuery Validate无法调用undefined的方法'call'

这个错误让我疯狂,一切似乎都井井有条,但希望我错过了一些简单的事情.

我的aspx中的代码

        $('#myForm').validate({
            rules: {
                'ctl00$SecondaryPlaceHolder$txPayloadDate': {
                    required: true,
                    date: true
                },
                'ctl00$SecondaryPlaceHolder$ddlMapPlat': {
                    required: true
                },
                'ctl00$SecondaryPlaceHolder$txtBlock': {
                    maxLength: 3
                },
                'ctl00$SecondaryPlaceHolder$txtLeakNumber': {
                    number: true,
                    maxLength: 27
                },
                'ctl00$SecondaryPlaceHolder$txtHouseNumber': {
                    required: true,
                    maxLength: 10,
                },
                'ctl00$SecondaryPlaceHolder$txtStreet': {
                    required: true,
                    maxLength: 100
                },
                'ctl00$SecondaryPlaceHolder$txtCity': {
                    required: true,
                    maxLength: 50
                },
                'ctl00$SecondaryPlaceHolder$txtReading': {
                    isPositiveInteger: true,
                    maxLength: 100
                },
                'ctl00$SecondaryPlaceHolder$ddlInfoCodes': {
                    existsWithLowReading: true
                },
                'ctl00$SecondaryPlaceHolder$txtLocationRemarks': {
                    maxLength: 500
                },
                'txtGrade2RequestedRepairDate': {
                    date: true
                },
                'ctl00$SecondaryPlaceHolder$ddlEquipment': {
                    required: true
                }
            }
        });
Run Code Online (Sandbox Code Playgroud)

自定义验证 …

asp.net jquery jquery-validate

8
推荐指数
1
解决办法
7927
查看次数

Rails启动Ubuntu中的问题

我用过rvm来安装rails ..没问题.

成功创建了一个新应用

运行bundle install没有问题.

虽然,尝试进一步运行任何命令(rails s,rails g controller ..等)

我收到了这个错误

    /home/USER/.rvm/gems/ruby-1.9.2-p290/gems/execjs-1.2.9/lib/execjs              /runtimes.rb:47:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
Run Code Online (Sandbox Code Playgroud)

我假设有一个宝石的问题,但我真的对发生的事情一无所知,似乎无法找到解决这个问题的任何事情

ubuntu ruby-on-rails

3
推荐指数
1
解决办法
1743
查看次数