.railsrc conflict
Closed this issue · 2 comments
d13r commented
My ~/.railsrc
file contains this:
--skip-bundle --database mysql --template ~/lib/rails-template.rb
Which the rails
command uses as the default options when creating a new app (source).
But I just installed irbtools and it seems to be trying to load that same file as Ruby source code, which causes IRB to crash:
$ rails c
Loading development environment (Rails 3.2.6)
...
/home/dave/.railsrc:1: unknown regexp options - ral (SyntaxError)
...
from /.../gems/irbtools-1.2.2/lib/irbtools.rb:80:in `<top (required)>'
...
Is there some way I can prevent this and still use irbtools?
janlelis commented
Hi davejamesmiller,
irbtools treats the ,railsrc
file just like an .irbrc
to load in rails environments. You can deactivate this behaviour by setting Irbtools.railsrc = false
.
However, since this kind of functionality is Rails-specific, it shouldn't be part of base irbtools. I will remove it with the next version.
d13r commented
Thanks, that worked. :)