A new rational Krylov method for the efficient solution of nonlinear eigenvalue problems, A(λ)x = 0, is proposed. This iterative method, called fully rational Krylov method for nonlinear eigenvalue problems (abbreviated as NLEIGS), is based on linear rational interpolation and generalizes the Newton rational Krylov method proposed in [R. Van Beeumen, K. Meerbergen, and W. Michiels, SIAM J. Sci. Comput., 35 (2013), pp. A327-A350]. NLEIGS utilizes a dynamically constructed rational interpolant of the nonlinear function A(λ) and a new companion-type linearization for obtaining a generalized eigenvalue problem with special structure. This structure is particularly suited for the rational Krylov method. A new approach for the computation of rational divided differences using matrix functions is presented. It is shown that NLEIGS has a computational cost comparable to the Newton rational Krylov method but converges more reliably, in particular, if the nonlinear function A(λ) has singularities nearby the target set. Moreover, NLEIGS implements an automatic scaling procedure which makes it work robustly independently of the location and shape of the target set, and it also features low-rank approximation techniques for increased computational efficiency. Small-and large-scale numerical examples are included. From the numerical experiments we can recommend two variants of the algorithm for solving the nonlinear eigenvalue problem.