Skip to content

Instantly share code, notes, and snippets.

@trungv0
Last active August 29, 2015 14:21
Show Gist options
  • Save trungv0/0906aa0c53059a9ddf79 to your computer and use it in GitHub Desktop.
Save trungv0/0906aa0c53059a9ddf79 to your computer and use it in GitHub Desktop.
install ruby on mac osx yosemite using rvm; frontend stuff; mongo
#####
# Gemfile
gem 'bootstrap-sass', '~> 3.3.4'
gem 'angularjs-rails'
#####
# application.scss
@import "bootstrap-sprockets";
@import "bootstrap";
#####
# application.js
//= require bootstrap-sprockets
#####
# Gemfile
gem 'mongoid', '~> 4' # Rails 4
gem 'bson_ext'
#####
# model
class MyModel
include Mongoid::Document
end
#####
# remove all references to active_record/ActiveRecord
# in application.rb, development.rb, production.rb, test.rb, rails_helper.rb (for RSpec)
#####
# application.rb -- Rails 4
# require "rails/all" <-- remove this
require "action_controller/railtie"
require "action_mailer/railtie"
require "sprockets/railtie"
require "rails/test_unit/railtie"
...
config.generators do |g|
g.orm :mongoid
end
Mongoid.logger.level = Logger::DEBUG
Moped.logger.level = Logger::DEBUG
# rails on mac
## rvm (https://rvm.io/rvm/install)
> [sudo] brew install gpg
> gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
> \curl -sSL https://get.rvm.io | bash -s stable
## restart shell
> [sudo] rvm install ruby-[version]
> rvm alias create default ruby-[version]
> rum use ruby-[version]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment