nonsequitur / inf-ruby

218 stars 68 forks source link

Is there a way to force a particular console command? #144

Closed nmk closed 3 years ago

nmk commented 3 years ago

Hello,

I am working on a rails project which has a number of embedded rails engines in it. Whenever I am in a file in the root app, inf-ruby-console-auto correctly recognizes the project as a rails project and runs inf-ruby-console-rails. Whenever I am in a file within one of the engines, inf-ruby-console-auto picks the engine root as a gem project and runs inf-ruby-console-gem from the engines root directory.

I am mainly using the inf-ruby process as a backend for robe-mode and would like to have the rails app running there 99% of the time as opposed to just loading one of the engine gems.

Is there a way to force inf-ruby-console-auto to run inf-ruby-console-rails (possibly with a setting in the .dir-locals.el file)? I looked at the inf-ruby code but could not see a setting I could use to facilitate this.

Thanks for any pointers in advance!

Best, Nickolay

dgutov commented 3 years ago

Hi!

There are a few options.

nmk commented 3 years ago

Thank you for the suggestions! I went with setting inf-ruby-console-patterns-alist in .dir-locals.el and it solved the problem I was having.