The specific heat ratio for $\rm CO_2$ at room temperature is $1.28$ according to my tables. Since $C_V= \left.\frac{\partial U}{\partial T}\right|_V$ and $C_P=\left.\frac{\partial U}{\partial T}\right|_V+\left(P+\left.\frac{\partial U}{\partial V}\right|_T\right) \left.\frac{\partial V}{\partial T}\right|_P$ and $γ=\frac{C_P}{C_V}$, then $$γ=1+\frac{\left(P+\left.\frac{\partial U}{\partial V}\right|_T\right) \left.\frac{\partial V}{\partial T}\right|_P}{\left.\frac{\partial U}{\partial T}\right|_V}.$$
Given the equipartition theorem, we can treat the internal energy as a linear function of temperature $U(t)=\frac{f}{2} RT$ where $f$ is the number of degrees of freedom of the molecule.
Basically, my question is, with the internal energy defined as above, the value for $\gamma$ seems to only depend on the number of degrees of freedom. For monoatomic Helium which only has 3 degrees of freedom, $\gamma=\frac{C_P}{C_V} = \frac{5}{3}$, my table agrees with this value. For N$_2$ a diatomic molecule that has 3 translational degrees of freedom and 2 rotational, $\gamma=\frac{C_P}{C_V} = \frac{7}{5}$ which again is the accepted value. But using this reasoning, I can't get the right value of $\gamma$ for CO$_2$. Why does it work for some gases but not for others?