Tom Prats
Tom Prats

Reputation: 7911

Is there a Cuba equivalent of the Rails Console?

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.

Upvotes: 0

Views: 189

Answers (1)

tonchis
tonchis

Reputation: 638

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 }

Upvotes: 0

Related Questions