Skip to main content

Posts

Showing posts from April, 2013

Adding a local repo to Github

You created a local repo in your m/c and then want to push it to github The github repo for your project has already been created on github. Either you have created it or has been added as one of the collaborators. When you create a project $ rails new app1 --skip-active-record --skip-bundle and want this to be associated to the repo cd to the project folder, $ cd app1 and then execute $git init $ git remote add origin git@github.com:analytics/app1.git then do $git pull origin master $git push So, the local repo has been pushed to the remote github repo

Starting with mongodb

 Create a new rails application for mongo, so let's skip active record as it's not required. rails new appname -- skip - active - record In case if want to skip bundle, append this --skip-bundle whereas if you want to use mysql as default append this -d mysql Use the following rails versions which are release after the security fix,       3.2.11       3.1.10       3.0.19       2.3.15 rails g mongoid:config Checkout for mongoid.yml for db configuration. Check for config/application.rb. it would have the below lines.  # Pick the frameworks you want: # require "active_record/railtie"  require "action_controller/railtie"  require "action_mailer/railtie"  require "active_resource/railtie"  require "sprockets/railtie"  require "rails/test_unit/railtie" Some basic things which can be followed for good practices. Setup RVM Then create a gemset, rvm gemset create analytics o/p: gemset created