Is there a Cuba equivalent of the Rails Console?

191 Views Asked by At

I'd like to be able to test classes that I require in Cuba without having to require them each individually using the irb. What I've been using instead is an endpoint that runs binding.pry, but I'd much rather be able to use something like the Rails Console.

1

There are 1 best solutions below

0
tonchis On

You can $ pry -r ./app where app.rb requires all of your project's files.

To require all files, you can look at something like

Dir["./models/**/*.rb"].each { |rb| require rb }