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’
Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s