Question: I initially tried rbenv and followed [this person's issue](https://stackoverflow.com/questions/64185912/need-help-installing-ruby-2-7-2-on-mac) but I ended up switching to RVM and getting this error:

```
Error running '__rvm_make -j4',
please read /Users/thendralprabu/.rvm/log/1622423552_ruby-2.7.2/make.log

There has been an error while running make. Halting the installation.

```

Here's the order of steps I attempted so far.

```
rvm install 2.7.2
rvm get master
rvm reinstall 2.7.2

```

[Here's](https://i.stack.imgur.com/IQzXc.png) what my make file is telling me, and my errors have been pointing me in the direction of the \*include statement in the makefile, telling me that the file doesn't exist and I'm not sure how to address that.

Answer: 
You can try this,

* Add arrow method to onClick props

```
{cart.map((cart, key) =>{
    return(
         <tr key={cart.id}>
             <td>{cart.name}</td>
             <td>{cart.price}</td>
             <td>
                 <Button onClick={() => handleDeleteItems(key)} variant="danger">Delete</Button>
             </td>
         </tr>
    )})}

```

```
// if "cart" is a state variable
const handleDeleteItem = (key) => {
  const temp = [...this.state.cart];
  temp.splice(index,1);
  this.setState({cart: temp});
}

// if "cart" is a normal variable
const handleDeleteItem = (key) => {
  cart.splice(index,1);
}

```
I can see you sent a delete call to the server. That suppose to delete that record on server side.

from your logic, you have an array/list `cart`, you use it to map data on the page.

the problem should be, after you sent delete to the server, in the response, you should refresh your array/list, or you should check the result if success, delete that record manually from your local state.

You need to refresh your local array/list to refresh your display records.