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 7865861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:12:47+00:00 2026-06-03T00:12:47+00:00

I’m getting ExecJS::RuntimeError when i try to start Rails server and the server log

  • 0

I’m getting ExecJS::RuntimeError when i try to start Rails server and the server log gives me the following:

   ActionView::Template::Error (delete operand may not be argument or var
      (in /home/sergey/Perfecto/arena/app/assets/javascripts/items.js.coffee)):
        47:         <%= raw flash_messages %>
        48:     </div>
        49: 
        50:     <%= javascript_include_tag "application" %>
        51:     <%= yield :javascripts %>
        52:     <%= yield :scripts %>
        53: </body>

I found that this error happens because Ubuntu don’t have a javascript runtime installed.
Okay. I’ve installed nodejs v0.6.3 from sources and tried to add gem 'therubyracer' to my Gemfile as it was suggested but the error still apperars.

What have i missed? Thanks in advance.

My items.js.coffee looks like this:

jQuery ->
    if $('#main.items_controller.new').length > 0   
        overlay = null
        iconOffsetX = 26
        iconOffsetY = 52 

        disableDraggingFor = (el) ->
            el.draggable = false
            el.onmousedown = (event) ->
                event.preventDefault()
                return false

        $(".draggable_item, #new_items_queue").disableSelection()

        $.each $(".draggable_item"), (i, el) ->
      disableDraggingFor(el)

        showInfobox = (marker,data) ->
            boxText = document.createElement("div")
            boxText.style.cssText = "height: 100%; background: url('/images/form.png') no-repeat;"
            boxText.innerHTML = '<div id="infoboxContent">' + data + '</div>'

            myOptions =
                content: boxText
                disableAutoPan: false
                maxWidth: 0
                pixelOffset: new google.maps.Size(-79, -386)
                zIndex: 0
                boxStyle:
                    width: "650px"
                    height: "350px"
                closeBoxMargin: "10px"
                infoBoxClearance: new google.maps.Size(1, 1)
                isHidden: false
                pane: "floatPane"
                enableEventPropagation: false

            ib = new InfoBox(myOptions)
            oldDraw = ib.draw
            ib.draw = ->
                oldDraw.apply(@)
                jQuery(ib.div_).hide()
                jQuery(ib.div_).fadeIn(900)

                $("#item_name").focus()

                priceResult = $("#converted_price")
                $("#item_price").live "keydown keyup keypress focus blur paste change", ->
                    fx.base = "USD"
                    fx.rates = 
                        "KGS": 46.4
                    input = accounting.unformat $("#item_price").val()
                    result = accounting.formatMoney fx.convert(input, from: "USD", to: "KGS"), 
                        symbol: "сом"
                        precision: 0
                        thousand: " "
                        format: 
                            pos : "%v %s"
                            neg : "(%v) %s"
                            zero: "0 %s"
                    priceResult.html result

            ib.open(Gmaps.map.map, marker)

            google.maps.event.addListener marker, 'dragstart', ->
                ib.hide()

            google.maps.event.addListener marker, 'dragend', ->
                newPosition = @getPosition()
                $.ajax "/items/reverse_geocode",
                    type: 'GET'
                    dataType: 'text'
                    data: 
                        lat: newPosition.lat()
                        lng: newPosition.lng()
                    error: (jqXHR, textStatus, errorThrown) ->
                    console.log "AJAX Error: #{textStatus}"
                    success: (data, textStatus, jqXHR) ->
                        $("#item_location").val data
                        ib.show()
                $('#item_latitude').val newPosition.lat()
                $('#item_longitude').val newPosition.lng()

            google.maps.event.addListener ib, 'domready', ->
                $('#change_position').bind 'click', ->
                    ib.close()
                    marker.setAnimation google.maps.Animation.BOUNCE

                    google.maps.event.addListener marker, 'position_changed', ->
                        setTimeout (->
                                                    ib.open(Gmaps.map.map, marker)
                                                ), 300

            google.maps.event.addListener ib, 'closeclick', -> 
                marker.setMap(null)
                delete marker
                $(".draggable_item").draggable("enable")

        placeMarker = (location,icon,shadow,kind) ->
            $.ajax "/items/reverse_geocode",
                type: 'GET'
                dataType: 'text'
                data: 
                    lat: location.lat()
                    lng: location.lng()
                    onlyCountry: true
                error: (jqXHR, textStatus, errorThrown) ->
                console.log "AJAX Error: #{textStatus}"
                success: (data, textStatus, jqXHR) ->
                    if data != "Киргизия"
                        humane "Вы можете добавлять объявления только в Кыргызстане"
                    else
                        $(".draggable_item").draggable("disable")

                        marker = new google.maps.Marker
                           position: location
                           map: Gmaps.map.map
                           icon: icon
                           shadow: shadow
                           draggable: true
                           zIndex: 99

                        $.ajax "/items/new.js",
                            type: 'GET'
                            dataType: 'text'
                            data: 
                                content: kind
                                lat: location.lat()
                                lng: location.lng()
                            error: (jqXHR, textStatus, errorThrown) ->
                            console.log "AJAX Error: #{textStatus}"
                            success: (data, textStatus, jqXHR) ->
                                 showInfobox marker, data

        Gmaps.map.callback = ->
            @.map.mapTypes.set "OSM", new google.maps.ImageMapType(
              getTileUrl: (coord, zoom) ->
                "http://192.168.0.112/osm_tiles2/" + zoom + "/" + coord.x + "/" + coord.y + ".png"

              tileSize: new google.maps.Size(256, 256)
              name: "OpenStreetMap"
              maxZoom: 18
            )
            @.map.setMapTypeId("OSM")
            overlay = new google.maps.OverlayView()
            overlay.draw = ->
            overlay.setMap @.map

        $.each $(".draggable_item"), ->
            $(@).draggable 
                cursor: "move",
                revert: false,
                helper: 'clone',
                stop: (event,ui) ->
                    point = new google.maps.Point ui.offset.left+iconOffsetX,ui.offset.top+iconOffsetY
                    location = overlay.getProjection().fromContainerPixelToLatLng(point)
                    placeMarker location, $(@).data('marker'), $(@).data('shadow'), $(@).data('kind')
  • 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-03T00:12:48+00:00Added an answer on June 3, 2026 at 12:12 am

    You have this in your CoffeeScript:

    google.maps.event.addListener ib, 'closeclick', -> 
        marker.setMap(null)
        delete marker
        $(".draggable_item").draggable("enable")
    

    And the error say this:

    delete operand may not be argument or var

    If you backtrack through your CoffeeScript from that delete marker, you’ll see that marker is an argument and you can’t use the JavaScript delete operator on an argument.

    You should be able to get rid of that delete marker without causing problems, just the marker.setMap(null) should be enough to make it go away.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
Specifically, suppose I start with the string string =hello \'i am \' me And
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

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.