A checklist to follow when starting a new project if you are using rbenv or rvm:
Make sure this is in your
Then any time you would need
bundle exec you can just use
be. Or alternatively, Hal Fulton pointed out you can do
bundle exec bash to get a bash shell that would be the same as using
be each time :)
- Create a directory for your project and change into it.
- Create a Ruby version file:
echo "2.4.0" > .ruby_version.
- Change out of directory and back in, and ensure your version of ruby is correct with
- Make sure Bundler is installed:
gem install bundler.
- Create a Gemfile
- Setup git repo with
- Create a README file and put the name of your project and what it is used for.
- Add all files
git add ..
git commit -m "inital commit".
Then if you are making a ruby gem:
bundle gem myawesomegemor do it by hand (helps you to remember.. hehe)
- Create a gemspec
- Make directory:
- Make library file:
- Make test directory:
- Make test file:
Gem spec template:
1 2 3 4 5 6 7 8 9 10 11 12 13
If you are making a rails app:
Add the version of Rails you want to use to the Gemfile ie:
rails "5.0.1" and
rails new . to create a rails app with the same name as current directory.