#Ubuntu, Ruby, RVM, Rails, and You - cheatsheet from http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/ - Read it! I added the MongoDB bit
sudo apt-get -y update
sudo apt-get -y install build-essential git-core curl
# rubygems DNS is temporarily down, put this into your /etc/hosts to install gems, | |
# but don't forget to remove the entries once their DNS is back up again | |
72.4.120.124 rubygems.org | |
207.171.181.231 production.s3.rubygems.org | |
216.137.45.24 production.cf.rubygems.org |
#Ubuntu, Ruby, RVM, Rails, and You - cheatsheet from http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/ - Read it! I added the MongoDB bit
sudo apt-get -y update
sudo apt-get -y install build-essential git-core curl
To generate a Mongoid based rails app (from Railswizard.org)
rails new [mongoid appname] -m http://railswizard.org/79414dab7ac3c4717ff9.rb -O
Mongoid implementation of Ryan Bates authentication-from-scratch lesson on Railscasts.
Also uses 'username' rather than 'email' for validation
Commandline:
rails new authmongoid -O
cd authmongoid/
Gemfile:
# mongo_template.rb | |
# fork of Ben Scofield's Rails MongoMapper Template (http://gist.github.com/181842) | |
# | |
# To use: | |
# rails project_name -m http://gist.github.com/gists/219223.txt | |
# remove unneeded defaults | |
run "rm public/index.html" | |
run "rm public/images/rails.png" | |
run "rm public/javascripts/controls.js" |
defaults: &defaults | |
autocreate_indexes: true | |
max_retries_on_connection_failure: 3 | |
allow_dynamic_fields: false | |
development: | |
host: localhost | |
database: taq_development |
heroku drains:add syslog://logs.papertrailapp.com:[port number]
Ta-dah!
See Ryan's RailsCast on js-TokenField http://railscasts.com/episodes/258-token-fields-revised
This is how to Mongoid-ize it
Note: make sure you specify '_id' instead of the default 'id'
item js.coffee
jQuery ->
$('#gift_tag_tokens').tokenInput '/tags.json'