agGrid not defined using ag-grid-community

I am trying the demo given in Documentation
I am getting an error agGrid not defined.I am using html.erb files.Can someone please tell me what the error is.

import { Grid } from 'ag-grid-community';

var columnDefs = [
  { field: "make" },
  { field: "model" },
  { field: "price" }

// specify the data
var rowData = [
  { make: "Toyota", model: "Celica", price: 35000 },
  { make: "Ford", model: "Mondeo", price: 32000 },
  { make: "Porsche", model: "Boxter", price: 72000 }

// let the grid know which columns and what data to use
var gridOptions = {
  columnDefs: columnDefs,
  rowData: rowData

// setup the grid after the page has finished loading
document.addEventListener('DOMContentLoaded', function() {
    var gridDiv = document.querySelector('#myGrid');
    new agGrid.Grid(gridDiv, gridOptions);


  <div class="collections_data text-center">
     <div id="myGrid"  class="ag-theme-alpine"></div>

51 thoughts on “agGrid not defined using ag-grid-community”

  1. 950232 542400Hi there, just became aware of your weblog via Google, and discovered that it is really informative. Im gonna watch out for brussels. Ill be grateful if you continue this in future. Numerous men and women is going to be benefited from your writing. Cheers! 845581

  2. Please let me know if you’re looking for a article author
    for your weblog. You have some really great posts and I think I would
    be a good asset. If you ever want to take some of the load off, I’d really like to write
    some material for your blog in exchange for a link back to mine.
    Please blast me an email if interested. Cheers!

  3. Hiya! Quick question that’s totally off topic. Do you know how to make your
    site mobile friendly? My website looks weird when browsing from my
    iphone 4. I’m trying to find a theme or plugin that might be
    able to resolve this problem. If you have any recommendations, please share.

  4. I am really impressed with your writing skills as well as
    with the layout on your blog. Is this a paid theme or did you modify it
    yourself? Anyway keep up the nice quality writing, it is rare
    to see a great blog like this one nowadays.

  5. hello there and thank you for your info – I have definitely picked up
    something new from right here. I did however expertise
    several technical issues using this web site, as I experienced
    to reload the site many times previous to I could get it to load correctly.

    I had been wondering if your web hosting is OK?
    Not that I’m complaining, but sluggish loading instances times will sometimes affect your placement in google and can damage
    your high quality score if ads and marketing with Adwords.
    Well I am adding this RSS to my e-mail and could look out for a lot more
    of your respective interesting content. Ensure
    that you update this again soon.

  6. 287408 782466Now im encountering a fresh short issues Once i cant appear like allowed to sign up for the certain give food to, Now im utilizing search engines like google audience. 197408

  7. Hello there, just became aware of your blog through Google,
    and found that it is really informative. I am going to watch out for brussels.
    I’ll appreciate if you continue this in future. Lots of people will be benefited from your
    writing. Cheers!

  8. Magnificent beat ! I wish to apprentice at the same time
    as you amend your web site, how could i subscribe for a weblog web site?
    The account aided me a appropriate deal. I were tiny bit familiar of this your broadcast provided shiny clear concept

  9. Hey there! I just wanted to ask if you ever have any issues with
    hackers? My last blog (wordpress) was hacked and I ended up losing many
    months of hard work due to no back up. Do you have any solutions to stop hackers?

  10. A person necessarily lend a hand to make seriously articles I would state.
    This is the first time I frequented your website page and thus far?
    I amazed with the research you made to create this particular submit incredible.
    Wonderful job!

  11. Hey would you mind letting me know which web host you’re working
    with? I’ve loaded your blog in 3 different internet browsers and
    I must say this blog loads a lot quicker then most. Can you
    recommend a good internet hosting provider at
    a reasonable price? Thanks a lot, I appreciate it!

  12. Heya! I just wanted to ask if you ever have any problems with hackers?
    My last blog (wordpress) was hacked and I ended up losing several weeks of hard work due to no backup.
    Do you have any methods to protect against hackers?