I've been on a Mac just over a month and before that I've been using Windows and wrote a .bat file to run a few other little .bat files to fire up MongoDB, guard start for livereload, rails server, and a rails console. And it lastly launches e-texteditor which opens that rails dir as a project.
I hope this is the right place to ask and not superuser. So what is one way I can automate these things on Mac? -- Currently, I launch 1 terminal window with 4 tabs. tab 1 runs 'mongod', tab 2 runs 'rails s', tab 3 runs 'guard start', tab 4 runs 'rails c'. then I open one more tab and do 'mate .'
This guide is designed for beginners who want to get started with creating a Rails application from scratch. It does not assume that you have any prior experience with Rails. Rails is a web application framework running on the Ruby programming language.
Ruby's and Ruby on Rails' Overall Popularity Although way behind main contenders, such as PHP or Python, Ruby still makes the cut for the 20 most popular programming languages list in 2022. The 2022 edition of Stack Overflow Annual Developer Survey also places RoR in a similar spot.
With our Learn Ruby and Learn Ruby on Rails courses, it will take about 10 hours to get through the material. However, once you're done, you'll want to spend time practicing on your own and building projects to really master the language.
Foreman is your best friend.
Step 1: Install foreman
gem i foreman
Step 2: Create a file named Procfile
rails: rails server
mongo: mongod
guard: guard start
Step 3: Run foreman start
. It will automatically start all 3 servers. If you press Ctrl-C
, all servers will be terminated.
Step 4: Run rails c
in another terminal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With