ruby-on-rails-3,backbone.js,navigation,render,jwplayerRelated issues-Collection of common programming errors
abaker
ruby-on-rails ruby-on-rails-3 heroku rake
When pushing to heroku, using a cleardb mysql db, heroku breaks when precompiling assets.I’ve added config.assets.initialize_on_precompile = false to my application.rb file. Its also in my enviroment/staging.rb & production.rb file. I’ve added the cleardb url to DATABSE_URL config variable as mysql2 url.I have a staging environment that I can push just fine, dont understand what is going onIve added the heroku output below:Your bundle is complete! It was installed into ./vendor/bundleClea
Bernardo Dias
ruby-on-rails ruby-on-rails-3 gem therubyracer
I’m trying to install:gem “twitter-bootstrap-rails”, :group => :assetsBut when I use bundle install, it’s happened:$ bundle install Fetching gem metadata from https://rubygems.org/……. Using rake (0.9.2.2) Using i18n (0.6.1) Using multi_json (1.3.6) Using activesupport (3.2.8) Using builder (3.0.2) Using activemodel (3.2.8) Using erubis (2.7.0) Using journey (1.0.4) Using rack (1.4.1) Using rack-cache (1.2) Using rack-test (0.6.1) Using hike (1.2.1) Using tilt (1.3.3) Using sprockets (2.1.
Ezra Okon
ruby-on-rails ruby-on-rails-3 eventmachine
I am trying to install the gem EventMachine on Windows 8 (using Ruby 1.9.3 with RubyInstaller) via bundle, but I get the following error. None of the previous solutions posted here worked for me. I greatly appreciate any help in advanceC:\Sites\routes_controller_exercise>bundle install Fetching gem metadata from https://rubygems.org/……….. Fetching gem metadata from https://rubygems.org/.. Resolving dependencies… Using rake (0.9.2.2) Using i18n (0.6.0) Using multi_json (1.3.6) Using a
Rails beginner
ruby-on-rails ruby ruby-on-rails-3
When I run the command ruby billede.rb in my lib folder in rails I get the error:C:\Rails\myapp\lib>ruby billede.rb C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require’: no such file to load — RMagick (LoadError)from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i n `require’from billede.rb:2:in `<main>’My Billede.rb:class Billede require ‘rubygems’ require ‘RMagick’if !ARGV[0]puts “Usage: watermark /image.png”exit endimage = Magick::Image.
Yak
ruby-on-rails ruby-on-rails-3 heroku gem bundler
Suddenly can’t push to Heroku! the error message says:uninitialized constant Haml::Util::Sass(Same exact code and libraries that worked fine until 2 days ago!)Compilation apparently failing on this line of application.rb:Bundler.require(*Rails.groups(:assets => %w(development test)))When compilation is attempted I get this:Could not detect rake tasks ensure you can run $ bundle execrake -P against your app with no environment variables present andusing the production group of your Gemfi
Ali
mysql ruby-on-rails-3 gem capistrano bundler
Hi guys I’ve been trying to deploy my application using capistrano. However I’m getting the following error consistently and have no idea on how to resolve it.* executing “cd /var/www/html/mysite.com/releases/20130224075438 && bundle install –gemfile /var/www/html/mysite.com/releases/20130224075438/Gemfile –path /var/www/html/mysite.com/shared/bundle –deployment –quiet –without development test”servers: [“166.78.22.204”][166.78.22.204] executing command** [out :: 166.78.22.204] Gem:
Mike
ruby-on-rails ruby-on-rails-3 bundle bundler libv8
i am trying to pack gems in vendor folder,so when i used bundle install –path vendor,i got error as[root@localhost myapp]# bundle install –path vendor Fetching source index for http://rubygems.org/ /usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler.rb:209: warning: Insecure world writable dir /home/developer in PATH, mode 040777 Using rake (10.1.0) Using multi_json (1.2.0) Using activesupport (3.1.10) Using builder (3.0.4) Using i18n (0.6.5) Using activemodel (3.1.
JakeP
ruby-on-rails ruby ruby-on-rails-3 twitter-bootstrap
I’m working with a project that uses twitter-bootstrap-rails. This project was built on a Linux box, and used therubyracer as a javascript runtime. I’ve been running into issues because therubyracer doesn’t seem to get along with Windows. therubyracer gem on windowsRight now I’m trying to “bundle update”; “therubyracer” is choking things up.I think I should be able to lean on JScript. How do I tell bundler to ignore this, without digging into each gem and manually removing its dependency on
Ava
ruby-on-rails-3 rubygems rubymine cookbook
I am trying to import a folder(open directory) on Ruby Mine but when I do it says “Install missing gems” Everytime I click on it, it installs some and then again gives the same error. I have Mac OS X 10.7.Here is the error:/Users/Vinisa/.rvm/rubies/ree-1.8.7-2011.03/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/bin/bundle install Fetching source index for http://rubygems.org/ Using rake (0.9.2) Using multi_json (1.0.3) Using activ
Mike Silvis
ruby-on-rails-3 postgresql gem
I have used RVM to install ruby and rails, and now am trying to install PostgreSQL via Sudo Gem install pgAll my other gems seem to be installing fine. This may be due to the fact that I uninstalled and reinstalled RVMHowever I get the following errorMikes-MacBook-Air:innoblue Silvis$ sudo gem install pg Building native extensions. This could take a while… ERROR: Error installing pg:ERROR: Failed to build gem native extension./Users/Silvis/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb chec
MrFoh
javascript android backbone.js cordova datepicker
Am developing an app using phonegap/cordova 3.0.0 and I am trying to get a native datepicker in my app using the datepicker plugin which i found in this repo. However after going through the plugin documentation for phonegap 3.0.0 i figured that the plugin was not compatible with phonegap 3.0.0, so i tried modifying using the guidelines in the phonegap documentation and hosting it on github here so i can add it my project. But when i try triggering the plugin in a backbone view i see these error
ipavlic
backbone.js coffeescript integration
Are there any inherent problems with using CoffeeScript to code backbone.js apps? Did you run into some problems that you couldn’t fix or had to use some particularly clunky workarounds?
James Billings
node.js mongodb backbone.js
I’m building my first app using the above technologies. I’ve spent the last couple of weeks using Backbone and now I’m trying to build an api using express on node with mongo db. (note, I’m just using the native node mongo module at the moment.)When I fill my backbone collection with data from mongo, by default it comes with the _id field. Not a problem until I try and update the document in mongo. Backbone passes back the _id as a string and it should be a object id. Mongo fails the update beca
bekite
node.js backbone.js requirejs mocha
I have a nodejs application which has the client-side code build with backbonejs and requirejs. I want to test the client-side code on my nodejs server using mocha.My mocha test file: test/view.coffeerequirejs = require ‘requirejs’ global.define = requirejsrequirejs.confignodeRequire: requirebaseUrl: ‘../public/javascripts/libs/’paths:jquery: “jquery”Underscore: “underscore”Backbone: “backbone”shim:’jquery’:exports: ‘$”Underscore’:exports: ‘_”Backbone’:deps: [‘jquery’, ‘Underscore’]exports: ‘B
Anatoliy Zaslavskiy
backbone.js backbone-relational
I have been trying to decipher backbone.relational source code. I found that it fires a lot of its own events. I did a log on some of my models, and found that a lot of these events seem to fire off for no reason.Big question is which events should I listen to and which are internal eventsThe events that Backbone.Relational seems to fire are:update:[attribute] seems to fire [Line 725, 941] relational:add This one seems to fire when .add() is called on a collection relational:remove This one seem
Sævar
android backbone.js trigger.io
I’m using forge.prefs.get to fetch a cached user token and it works fine in iOs and web. I’m using backbone.js to render everything. In Android, I get this error when trying to use the same call:[DEBUG] Native call prefs.get with task.params: {“key”:”user”} [DEBUG] Native call notification.hideLoading with task.params: {} [INFO] ——— beginning of /dev/log/system [DEBUG] Returned: {“content”:{“message”:”Method not supported on this platform”,”type”:”UNAVAILABLE”,”subtype”:null},”callid”:”4B0
EnZo
javascript backbone.js requirejs
I’m not sure what is the elegant way to pass server variables in to my Model.For example, i have an id of user that has to be implemented on my Model. But seems like Backbone with require are not able to do that.My two options are:Get a json file with Ajax. Add the variable on my index.php as a global.Someone know if exists a other way. Native on the clases?Trying to make work the example of backbonetutorials. I am not able to throw a callback when the method fetch().$(document).ready(function()
bento
backbone.js filtering underscore.js
I’m attempting to learn backbone.js and (by extension) underscore.js, and I’m having some difficulty understanding some of the conventions. While writing a simpel search filter, I thought that something like below would work: var search_string = new RegExp(query, “i”);var results = _.filter(this, function(data){return search_string.test(data.get(“title”));}));But, in fact, for this to work I need to change my filter function to the following: var search_string = new RegExp(query, “i”);var result
user1189762
ruby-on-rails rest backbone.js ember.js frontend
I already know that ember.js is a more heavy weight approach in contrast to backbone.js. I read a lot of articles about both.I am asking myself, which framework works easier as frontend for a rails rest backend. For backbone.js I saw different approaches to call a rest backend. For ember it seems that I have to include some more libraries like ‘data’ or ‘resources’. Why are there two libraries for this? So whats the better choice? There arent a lot of examples to connect the frontend with the ba
Alex
javascript regex backbone.js underscore.js mustache
I’m using backbone’s underscore templating engine with the mustache formatting patterns.I have already been successfully using it elsewhere in the project but now for the first time I’m using the looping list patterns from mustache to populate the template which is throwing an error which I’m a bit baffled by. The error in chrome is:”Uncaught SyntaxError: Unexpected token ILLEGAL”and points to underscore’s template function in the backtrace, which is pretty useless but in firebug i get a more he
Mac-Gon
javascript jquery html5 css3 navigation
I’ve been reading lots of the other posts, and no doubt it’s my inexperience with jQuery that is giving me trouble, but there are lots of things close to what I’m trying to accomplish. I have a div where I have a vertical navigation set of buttons. Inside that I want the other divs (child divs) that will be shown or hidden based on the navigation button clicked by the user. I want all of these divs to be in the same location on the screen…so, basically like a tabbed form but with vertical navi
Kara
internet-explorer jquery-plugins navigation hashtag
I have a website that uses the jQuery Address plugin from Asual for navigation.The problem I am having, is that using IE6, and IE7, when the user uses the back/forward buttons the website ends up at an unexpected page.Here’s a cut-down version of what I’m doing right now.$.address.init(function(event) {defaultPage = “1”; }).change(function(event) {$(“#content”).html(‘<div><img src=”/images/activity indicator.gif”></div>’)$(“#content”).load(“./pages/”+names+”.html”, function(){v
antonpug
javascript dojo navigation browser-history hashchange
So here’s the situation… We have two DoJo applications, A and B. On the last page of A, we launch a call that transitions to B – at that point in time, the unload event of A fires, we set some cookies and transition to B. Both applications currently listen to dojo/hashchange and whenever a hash change is detected, we reset it back to the old hash, effectively disabling browser navigation. Problem is, when we are transitioning from A to B, in the 2-3 seconds between the applications, there is
Tapas Bose
java jsf-2 exception-handling navigation faces-config
In my application I am willing to navigate to an error page whenever an exception occurred. The RuntimeException is handled and checked and is thrown again. For that I have defined a global navigation rule in Faces config:<navigation-rule><from-view-id>*</from-view-id><navigation-case><from-outcome>error</from-outcome><to-view-id>/error.xhtml</to-view-id></navigation-case> </navigation-rule>And in my catch block I am trying to navigate
Unheilig
ios iphone objective-c navigation segue
Just Have an issue and a “miss” in my programming “capacity”. I’ve got a tableview controller with some data parsed from a json. When you choose a “news” you to to the detail view with all data in it.Everything is ok, but I add a “check” If you are logged or not. And if not you are “redirected” to login screen.I try to do it with a segue (modal). It’s working, but when I do it, my “navigation” is broken, like if he “lost” he’s path.I try to do it programatically like :LoginViewController *contro
Ricardo Amaral
ajax jquery-mobile dom navigation
As most common web projects we have one with the following structure:<body><div data-role=”page”></div><script …> </body>This specific project is using jQuery Mobile and we are using jQM ajax navigation system. The thing is, for some reason I’m unaware, when I navigate to a different page, the <div data-role=”page”> will be moved below the <script> tag. I observed this behavior in Chrome’s dev tools.Is there a reason for jQM to do this? Is this behavio
Marve
javascript jquery navigation links
I am trying to write a skp nav link script but instead of grabbing the id i want to grab the class. How can I write the following script in jquery syntax to get the class name? $(document).ready(function() {$(“.ajax-video”).click(function(event) {event.preventDefault();document.getElementById(“currently-playing-title”).scrollIntoView();}); });Also for some reason the following does not work: $(‘.videoplayer’).scrollIntoView();
amorfis
jsf navigation
I have simple JSF application. Everything works fine, but not navigation. It behaves like <navigation-rule>s were not there. In my faces-config.xml I have some navigation rules like:<navigation-rule><from-view-id>/view/party/create/create.xhtml</from-view-id><navigation-case><from-outcome>edit</from-outcome><if>#{partyCreate.partyTypeSearch.code == partyTypeDao.organisation.code}</if><to-view-id>/view/party/create/edit-organisation.xhtm
Robert Cartaino
bug unanswered-questions navigation
Possible Duplicate:Unexpected Results From Clicking The Unanswered Button When I click ‘Unanswered’ in the menubar, I get a list of questions, all of which have been answered. Does it just mean there’s no accepted answer? If so, can we make that more obvious? Can we get some way of finding really unanswered questions?
Dave Clemmer
silverlight windows-phone-7 xaml navigation
Given a PhoneApplicationPage sub type, is there a way (other than relying on convention) to figure out its internal uri?In other words, I want to call GetUri<MyPage>() and get back something like /Views/MyPage.xaml.
Miguel P
c++ mfc render document mdi
in my application, i currently have 2 document types. The one i will be focusing on, will be the second. My application is a 3d engine editor, which is build in MFC MDI. The first document is the render window, which works perfect, because it’s simple to extract the hwnd of it, and then send it to my graphics class. But my second window, which is scripting, is supposed (for now) just to have a rich edit. But for some reason, it doesn’t render(actually it does, but only once :/).CEditorScriptVie
user2358649
ios opengl-es textures render movie
I am generating a movie through rendering OpenGL textures. Some frames of the resulting movie look not completely rendered, as they show a part of the previous frame. If I add a NSThread [NSThread sleepForTimeInterval:0.05]; the problem does not show up but I can’t rely on this instruction.This is the result without [NSThread sleepForTimeInterval:0.05]This is the result when adding [NSThread sleepForTimeInterval:0.05]The code I use is:dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIOR
user984621
ruby-on-rails-3 view model pagination render
I have a ArticleController, in which is a statement with all items in the table Articles. The statement has also pagination with jQuery.I would like to use this statement with pagination in an other controller for statement of items from DB table, the only different will be the other table.How can I do that? I try in my other controller something like:<%= render :template => ‘articles/index’%> #here is the Articles’ statementBut when I click on the next page of statement, I see only loa
natecraft1
ruby-on-rails routes render optional-parameters pushstate
I have a route with an optional parameter name GET /:name(/:age)(.:format) users#nameIn the associated controller I want to say that if the optional age parameter isn’t passed (as in a url like localhost:3000/FirstName%20Lastname/) then bring them to a route with an age such as localhost:3000/FirstName%20Lastname/25. My attempt in the controller is here:def name@user = User.find_by_name(params[:name])!params[:age].nil? ? gon.currentyr = params[:age] : render name_path(@user.age)… e
David
symfony2 twig render
I want to render dynamicly a form in Symfony. I passing a array with elements of element names to the render method ‘formElements’ => array(‘formelement1’, ‘formelement2’). How i want to use the element names in my template to show the form labels.{% for elementName in elementNames %}<div class=”form-lable”>{{ form_label({{ elementName }}) }}</div> {% endfor %}I received the following exception:A hash key must be a quoted string, a number, a name, or an expression enclosed in pare
Mrwolfy
ios uiview uiimageview render
I am trying to render a view and it’s contents after a transformation using UIGraphicsGetImageFromCurrentImageContext. Even though the view is scaled down, when I render it, the image size is correct, but the contents are rendered at their original size (in this case they are cropped as opposed to fit to the view as expected.here is a simple sample project: http://owolf.net/uploads/StackOverflow/ParentChildTransformTester.zipTo explain further: I create a parent view and a child view, add the ch
pruett
layout view ruby-on-rails-3.1 render
I’ve defined in my Users_controller: layout “intro”, only: [:new, :create]Here’s what my layout looks like: Intro.html.haml!!! 5 %html{lang:”en”} %head%title Intro= stylesheet_link_tag “application”, :media => “all”= javascript_include_tag “application”= csrf_meta_tags %body{style:”margin: 0”}%header= yield%footer= debug(params)When I render a page that calls for intro as the layout, it gets nested inside my application.html.haml file which is not good.Is there some way of avoiding this u
Rittel
css jsf render el
I was wondering if there is a library out there which enables me to do something like the following:<h:outputText value=”blablabla”><x:styleClass value=”class1″ rendered=”#{bean.firstboolean}”/><x:styleClass value=”class2″ rendered=”#{bean.secondboolean}”/> </h:outputText>Thus enabling the classes depending on whether the expression returns true during runtime.
Morgan Cheng
javascript browser render standards mode
I know that modern browsers generally have two render mode: standard mode and quirk mode. The browser detects the heading DocType.The question is how to detect render mode of current page at runtime. Is there any Firebug tool to do that?
Joel Coehoorn
asp.net user-controls render ascx
I’ve created a regular ASP.NET user control, including the ascx file. For example:MyUserControl.ascx MyUserControl.ascx.csThen I try to render the control manually, at runtime, using code similar to the following code:var testMyUserControl = new MyUserControl(); var textWriter = new HtmlTextWriter(new System.IO.StringWriter(new StringBuilder())); testMyUserControl.RenderControl(textWriter); Console.Write(textWriter.InnerWriter.ToString());Nothing that I put in the ASCX file seems to render – eit
Gabi Purcaru
javascript html5-video jwplayer
I’m trying to make jwplayer show the native iPhone play button (see below) on iPhone, and a custom skin elsewhere. I’ve tried to use chromeless: true, but it didn’t help (I still get the skinned play button). Now I’m stuck in jwplayer code and can’t find my way through. Can you help me out?
Kriem
php javascript jquery jwplayer
I sometimes get this error in my jwplayer: TypeError: non-native scope objectThis means that one video out of multiple videos I have has failed to load. This makes it unreliable. My question is that is there a way to make it more reliable and permanently fix this error?Below is code:<?php$key = $_GET[‘key’]; $i = $_GET[‘i’]; $v = $_GET[‘v’];?> <div id=”myElement-<?php echo $key.’-‘.$i; ?>”>Loading the player…<script type=”text/javascript”> jwplayer(“myElement-<?php e
Exitos
javascript jwplayer
I have an object being passed to a method from a flash object. I would like to be able to view all of the properties in this object a bit like you can do in c# with the ‘add watch’ feature in visual studio.Is this possible with javascript and firefox/firebug?I was thinking of doing a for loop and console.logging the results but what is the best way to iterate the object would I treat it as an array etc?Any advice much appreciated. Pete
Shawn Patoka
stream video-streaming embed jwplayer flowplayer
i have this stream:http://stream1.seenstream.com:1935/live/SpkEsy-AppWI.stream/playlist.m3u8I have JW Player 6 premium but it just flash crashes upon trying to load.We can get the stream to load on PCs embedding it with VLC. Also, on a Mac in Safari only, iOS, and some androids, embedding it with HTML5. But i was hoping for kind of a cross-platform solution.
user2676098
streaming video-streaming jwplayer cloudfiles
http://embed.asset.tv/hls/index.1.htmlI’ve been trying to get HLS streaming on JWplayer working for quite a while now. I know JWPlayer supports it. (We have a premium account)We’ve used the wizard builder and the embed code we use works with their example video file. However when we create our own m3u8 version of our videos, they wont play back. We use Zencoder and their recommended method of m3u8 creation. https://app.zencoder.com/docs/guides/encoding-settings/http-live-streamingWe use rackspa
Mr Lister
css twitter-bootstrap twitter-bootstrap-3 jwplayer
The following page was constantly crashing for me in IE9 on Windows 7:http://www.studyzone.tv/test1.htmlAfter much testing around, it turns out the line-height line in the Bootstrap 3 CSS File was causing the crash…or at least conflicting with JWPlayer somehow, and between them, causing the crash!body {font-family: “Helvetica Neue”, Helvetica, Arial, sans-serif;font-size: 14px;line-height: 1.428571429; /* THIS IS THE LINE THAT CUASES THE ERROR*/color: #333333;background-color: #ffffff; }I hav
Peter
javascript jquery jwplayer
So following JW Player’s I can get a video to load (obviously) it looks like this:<script type=”text/javascript” src=”/scripts/jwplayer.js”></script> <div id=”myElement”>Loading the player …</div> <script type=”text/javascript”>jwplayer(“myElement”).setup({file: “/uploads/example.mp4”,height: 360,image: “/uploads/example.jpg”,width: 640}); </script>I’m trying to accomplish something to this effect to load a video inside of a modal once that modal is triggere
arisetyo
requirejs jwplayer durandal
I want to use jwplayer on a Single Page App built using Durandal framework. The idea is to create a persistent audio player, unaffected by the application’s navigation. But I haven’t been able to load jwplayer in Durandal.I’ve successfully loaded jwplayer on a simple html file using Require.js. But this method doesn’t seem to work on Durandal (which also uses Require.js).This is my code on shell.js:define([‘jwplayer/jwplayer’,’durandal/plugins/router’,’durandal/app’], function (jwplayer,router,a
Nimbuz
javascript jquery jwplayer
jwplayer(“myElement_0”).onPlay(function(){ pausePlayers(1); alert(‘0 has started’); }); jwplayer(“myElement_1”).onPlay(function(){ pausePlayers(2); alert(‘1 has started’); }); jwplayer(“myElement_2”).onPlay(function(){ pausePlayers(3); alert(‘2 has started’); }); jwplayer(“myElement_3”).onPlay(function(){ pausePlayers(4); alert(‘3 has started’); }); function pausePlayers(playing) { for (var i=0; i<4; i++) {if(i != playing) { jwplayer(“myElement_”+i).pause(true); }} };I have this script to pau
Curtis
javascript asp.net jwplayer
The jwplayer website suggests that you embed jwplayer inside javascript this way:jwplayer(“videoDIV”).setup({file: “vid.flv”,height: 300,width: 400,//Etc…However, when I try that in ASP.NET I getUncaught TypeError: Cannot call method ‘setup’ of nullI should just be able to call jwplayer like a variable, and it should be accessible as long as I have the <script src… stuff, right?The error appears on the jwplayer(“videoDIV”).setup({ line
Web site is in building