Question: i have javascript in my codeigniter, which creates live graph. I taking data from database.
I need live graph, which will take data every x seconds from database, and draw it into graph.

I have this:

```
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script>
    google.charts.load('current', {packages: ['corechart', 'line']});
    google.charts.setOnLoadCallback(drawBasic);
    function drawBasic() {

        var data = new google.visualization.DataTable();
        data.addColumn('number', 'X');
        data.addColumn('number', 'Dogs');

        var options = {
            hAxis: {
                title: 'Time'
            },
            vAxis: {
                title: 'Popularity'
            }
        };

        var chart = new google.visualization.LineChart(document.getElementById('chart_div'));

        setInterval(function() {
            grepData();

            data.addRows([
                [prvni, druha]
            ]);
            chart.draw(data, options);

        }, 6000);

        function grepData(){
            <?php
            $vyber = $this->db->query('SELECT id, percent FROM cpu_stats ORDER BY id DESC LIMIT 1;');
            foreach ($vyber->result_array() as $row)
                {

            ?>
            prvni = <?php echo $row->id;?>;
            druha = <?php echo $row->percent;?>;<?php
        }?>
        }
    }

</script>

```

Problem is, query will take data once only. When i write second query in function, it will take data two times. When i delete query and write only `prvni++; druha++`, graph will working. 

Sorry for my english.

Answer: 
The Gemfile is just a Ruby file thats run by Bundler when you run `bundle install` and `bundle update`. 

There is no actual difference between:

```
gem "browser"
gem 'browser'

```

Both call the `Bundler::Dsl#gem` method with a string [literal](https://docs.ruby-lang.org/en/2.0.0/syntax/literals_rdoc.html). Double quoted strings can be interpolated but thats rarely done in in this context. 

The choice really boils down to personal preference or whatever the style guide you are following mandates.

> 
> Will mixing single and double quotes cause any trouble?
> 
> 
> 

Depends on how much OCD your colleges have.
Since [Gemfile is evaluated as a plain Ruby code](https://bundler.io/man/gemfile.5.html#SYNTAX), actually you should understand what is the difference between single quotes `''`and double quotes `""` in Ruby, not in Gemfile.

So, as concisely described [in this answer](https://stackoverflow.com/a/6395332/12201472),

`""` allows you to do string interpolation, e.g.:

```rb
world_type = 'Mars'
"Hello #{world_type}"

```