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

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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

About Hadiyah

Practicing loving God, neighbors, and myself daily. Leveraging venture capital to advance racial equity at HBCUvc.