4

Never Type Bundle Exec Again

 3 years ago
source link: https://fuzzyblog.io/blog/rails/2019/07/17/never-type-bundle-exec-again.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Never Type Bundle Exec Again

Jul 17, 2019

The command prefix "bundle exec" is something that I've typed probably a thousand, thousand, thousand times. The bundle exec prefix goes in front of so many damn Rails commands and while I've seen other developers alias it to "be", that never felt right to me. And now there's a workaround where I don't even have to type that thanks to the miracle of Z-Shell and Oh My Zsh.

Edit your ~/.zshrc and add search for the word plugins and then change that line to this:

plugins=(git bundler brew gem heroku)

Then you and to do a source on it:

source ~/.zshrc

And then you can do this magic:

rails g migration add_frequency_and_economic_value_to_habits
  invoke  active_record
  create    db/migrate/20190717211807_add_frequency_and_economic_value_to_habits.rb

And that makes my life better by 13 characters that I'm never going to have to type again. Honest to the FSM, I'm mildly aroused right now …

And thank you to CoderWall for publishing this originally.


Posted In: #rails #ruby


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK