To solve the optimization problem described, we first need to translate the natural language description into a symbolic representation. This involves defining variables for the quantities of interest (orders of fries and onion rings), formulating the objective function based on these variables, and expressing the constraints as equations or inequalities involving these variables.

Let's define:
- $x_1$ as the number of orders of fries sold.
- $x_2$ as the number of orders of onion rings sold.

The objective is to maximize profit. Given that the profit per order of fries ($x_1$) is $4 and the profit per order of onion rings ($x_2$) is $5, the objective function can be written as:
\[ \text{Maximize: } 4x_1 + 5x_2 \]

The constraints based on the problem description are:
1. The food truck must sell at least 20 orders of fries: $x_1 \geq 20$
2. The food truck can make at most 50 orders of fries: $x_1 \leq 50$
3. The food truck must sell at least 10 orders of onion rings: $x_2 \geq 10$
4. The food truck can make at most 40 orders of onion rings: $x_2 \leq 40$
5. The total number of orders cannot exceed 50: $x_1 + x_2 \leq 50$

Thus, the symbolic representation of the problem is:
```json
{
    'sym_variables': [('x1', 'orders of fries'), ('x2', 'orders of onion rings')],
    'objective_function': '4*x1 + 5*x2',
    'constraints': ['x1 >= 20', 'x1 <= 50', 'x2 >= 10', 'x2 <= 40', 'x1 + x2 <= 50']
}
```

Now, let's implement this problem using Gurobi in Python:

```python
from gurobipy import *

# Create a new model
m = Model("FoodTruckProfit")

# Define the variables
x1 = m.addVar(lb=20, ub=50, vtype=GRB.INTEGER, name="orders_of_fries")
x2 = m.addVar(lb=10, ub=40, vtype=GRB.INTEGER, name="orders_of_onion_rings")

# Define the objective function
m.setObjective(4*x1 + 5*x2, GRB.MAXIMIZE)

# Add the constraint for total orders
m.addConstr(x1 + x2 <= 50, "total_orders_constraint")

# Optimize the model
m.optimize()

# Print the solution
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Orders of Fries: {x1.x}")
    print(f"Orders of Onion Rings: {x2.x}")
    print(f"Total Profit: ${4*x1.x + 5*x2.x}")
else:
    print("No optimal solution found")
```