I was able to get this to work well in JuMP 18.5 using the following syntax:

```
genv = Gurobi.Env()
m = Model(solver=GurobiSolver(OutputFlag = 0, genv))
```

However, in JuMP 19 it seems like the way to reuse the environment has changed?

I tried this syntax given by @evanfields:

```
gurobi_env = Gurobi.Env()
m = Model(with_optimizer(Gurobi.Optimizer, gurobi_env))
```

and I get this output:

```
julia> gurobi_env = Gurobi.Env()
Academic license - for non-commercial use only
Gurobi.Env(Ptr{Nothing} @0x000000000342c2d0)
julia> m = Model(with_optimizer(Gurobi.Optimizer, gurobi_env))
ERROR: Gurobi.Optimizer does not have any method with arguments (Gurobi.Env(Ptr{Nothing} @0x000000000342c2d0),).The first argument of `with_optimizer` should be callable with the other argument of `with_optimizer`.
Stacktrace:
[1] error(::String, ::String, ::String) at ./error.jl:42
[2] #with_optimizer#1(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Type, ::Gurobi.Env) at /home/at/.julia/packages/JuMP/jnmGG/src/JuMP.jl:108
[3] with_optimizer(::Type, ::Gurobi.Env) at /home/at/.julia/packages/JuMP/jnmGG/src/JuMP.jl:107
[4] top-level scope at none:0
```

Can someone explain to me what the correct syntax for this is now?

EDIT: The problem was I needed to update Gurobi.jl from 0.5.9 to 0.6.0. After doing that the syntax given by @evanfields works.