Script for starting new rails projects

Tbl uses a script for starting new rails projects.

After you run ‘rails new example -d=postgresql’, create a new file in the script folder of the new project. (don’t worry about an extension for the file)

Add the contents to the new file


set -e
gem install bundler
bundle install –binstubs bin
createuser -s -e replacemewithusername
rake db:create
rake db:migrate
rake db:seed

view raw

Newb

hosted with ❤ by GitHub

Be sure to replace ‘replacemewithusername’ with the actually username. This is the same username in your config/database.yml file

After the file is created changed the permissions on the file, to make it executable. This is done by running:

$ chmod +x script/filename

Then run

$ ./script/filename


Discover more from Hadiyah Mujhid

Subscribe to get the latest posts sent to your email.

One thought on “Script for starting new rails projects

  1. Hadiyah,
    I’ve been meaning to ask you if you might post an article about the things you don’t like about Rails. At Blosme, we work with a number of technologies, but we love Rails but it frustrates us quite a bit. We just never really see anything from others who are frustrated with things that either happen or don’t happen with Rails.

Leave a comment

Unknown's avatar

About Hadiyah

A believer in love as a practice, and equity as a design. I’m shaping the future through venture capital, community-building, and storytelling — rooted in faith, and working across geographies.