Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9149309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:27:34+00:00 2026-06-17T11:27:34+00:00

I have a backbone/rails app that uses local storage and jquery ui. I developed

  • 0

I have a backbone/rails app that uses local storage and jquery ui. I developed it on one Rails 3.2.8 application, got it working, and then copied the code to the application (also Rails 3.2.8) that I use on the server, but before I pushed it to the server, I tested it on local host. Strangely, it doesn’t work on the Rails app that’s destined for the server. Just one jQuery ui method is causing me a problem on the new app, throwing this error.

Object [object Object] has no method 'sortable' 

When I comment out the sortable code from the render function below, the app works fine
The version of jQuery is the same (1.8) in both apps as is the jQuery ui version (1.9.2) (the versions of backbone are the same too). I checked the page source for both apps, and the files are being loaded in the same order. While the original app works on both Chrome and Firefox, The one twist is that I’m getting the same error on both applications in Safari. I cleared the cache in every browser. The code is wrapped in this $(function(){ });

$(function() {

    ...ommitted code...

       window.App = new AppView();

});

However, I also tried to put document ready code around the initialization of the app view, but it didn’t change anything

$(document).ready(function() {

       window.App = new AppView();
});

Given the above (and the code below), does the fact that neither work properly in Safari, but the original app works in Chrome and Firefox (while the other doesn’t) indicate any possible problem area you could direct me to…Thank you in advance

Render function where sortable’s located

 render: function() {
            $(this.el).html(this.template(this.model.toJSON()));
             this.setText();
             var that = this;
             console.log(this.$("ul.bucket-companies"));
             this.$("ul.bucket-companies").sortable({
             dropOnEmpty: true,
             connectWith: "ul.bucket-companies",
             receive: function(event, ui) {
              var bucket = that.model;
              var id = $(ui.item[0]).attr("id");
              var company = Companies.get(id);
              var oldBucket = company.getBucket();

             company.setBucket(bucket.id);
             oldBucket.removeCompany(company.id);
             bucket.addCompany(company.id);
            }
           });
              return this;
            },

Update.

This is what the console.log in the render function shows console.log(this.$("ul.bucket-companies"));

[ul.bucket-companies, prevObject: i.fn.i.init[1], context: li.bucket-item, selector: "ul.bucket-companies", constructor: function, init: function…]
0: ul.bucket-companies
context: li.bucket-item
length: 1
prevObject: i.fn.i.init[1]
selector: "ul.bucket-companies"
__proto__: Object[0]
 feng.js:87
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:27:35+00:00Added an answer on June 17, 2026 at 11:27 am

    The problem was fixed by doing rake assets:precompile again on the rails app destined for the server (it had already precompiled once before when the app, minus this backbone component, was originally pushed to the server). Although I was going to compile the assets again when it came time to push, I’m surprised that subsequent precompile was necessary to test the new code on local host before pushing. I’m guessing that, having compiled once, and then adding more javascript (including jQuery UI) without compiling a second time mixed things together in an unfriendly way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Rails 3.1 app that uses the codebrew/backbone-rails . In a .jst.ejs
I'm having some difficulty with backbone js. Currently, I have a rails app that
I have a simple List-style Backbone app that I'm making with a Rails backend.
I have a Rails 3.2.3 app with Backbone.js and I'm using pushState on my
I have a Backbone.js application that allows users to create graphs based on large
We have a backbone.js app that displays a number of forms to the user.
I have a rails app using backbone. In the console, I can create a
I'm building small one page application with rails 3.1 mongodb and backbonejs. I have
I have a Rails application with the backbone-rails gem. Which works out fine but
I have a backbone application that has a number of views. Switching between views

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.