jweslley / rails_completion

Bash completion support for Ruby on Rails.
Other
105 stars 16 forks source link

Added two if conditions to avoid errors #12

Closed brunoarueira closed 9 years ago

brunoarueira commented 12 years ago

I added two conditions to avoid errors when using Rails generators with Rails Engines.

Using actual version of rails_completion, when run commands like this:

rails g m<Tab><Tab>

I got exceptions with config/application file not found and after .rails_generators~ file not found too.

With this pull request the errors will away!

jweslley commented 12 years ago

Hi @brunoarueira , is rails_completion useful for Rails Engines too? what commands are you completing with it ? I just wanna understand this use case. :smiley:

brunoarueira commented 12 years ago

Hi,

It's only a try to rescue the exceptions I got when I run rails at my console.

For example, if I had a normal rails app:

rails g scaffold Product title:string price:float

But if I try to run the command above inside rails engine, I got many errors like config/application file not found and after that I got errors like .rails_generators~ file not found too.

See the logs I got now at this https://gist.github.com/3947506