Setup Existing Project

  • Install rbenv if not installed.
  • create two hidden files .ruby-version and .rbenv-gemsets in main/root folder of project.
    • add ruby version in .ruby-version file. e.g: 2.2.1
    • give a name to gemset where all the gems will be install for this project in .rbenv-gemsets. e.g: abc
  • Open terminal and go to project directory using ‘cd’ command.
    • run command: ‘rbenv gemset active’
    • it will display the gemset name which you just mentioned in .rbenv-gemset file.
    • install bundler using “gem install bundler” if not installed
    • run command: ‘bundle install’
    • install missing libs if bundle install does not get succeeded.
  • Open database.yml and edit it according to your local setup.
  • Again switch back to terminal:
    • create database using: ‘rake db:create’
    • run migration: ‘rake db:migrate’
    • run seed: ‘rake db:seed’