background preloader

Ruby + MongoDB

Facebook Twitter

Bundler: The best way to manage a Ruby application's gems. Rails Examples and Tutorials · RailsApps. Ruby. Ruby on Rails Screencasts - RailsCasts. Getting Started with Rails. 1 Guide Assumptions This guide is designed for beginners who want to get started with a Rails application from scratch. It does not assume that you have any prior experience with Rails.

Rails is a web application framework running on the Ruby programming language. If you have no prior experience with Ruby, you will find a very steep learning curve diving straight into Rails. There are several curated lists of online resources for learning Ruby: Be aware that some resources, while still excellent, cover versions of Ruby as old as 1.6, and commonly 1.8, and will not include some syntax that you will see in day-to-day development with Rails. 2 What is Rails? Rails is a web application development framework written in the Ruby programming language. Rails is opinionated software. The Rails philosophy includes two major guiding principles: 3 Creating a New Rails Project The best way to read this guide is to follow it step by step. 3.1 Installing Rails Open up a command line prompt. 4 Hello, Rails! When NoSQL Databases Are — Yes — Good For You And Your Company. The proliferation of non-relational databases in the tech sector these days could lead you to think that these data management tools (also known as NoSQL databases) are eventually going to make traditional relational databases extinct.

Not so. Each of these database types is best suited for very different types of workloads, and that's going to prevent either one from tromping the other into the dust. Which means that IT and other managers are going to have to figure out which approach is best suited for the task at hand. In this two-part series, I'll examine the capabilities of both NoSQL and relational databases to help you make the right decisions for your organization. "NoSQL"? Right off the bat, NoSQL databases are unique because they are usually independent from Structured Query Language (SQL) found in relational databases.

See also: Relational Databases Aren't Dead—Heck, They're Not Even Sleeping NoSQL databases are designed to excel in speed and volume. Go Big Or Go Home Downtime? MongoDB and Ruby on Rails. Home. Mongoid (pronounced mann-goyd) is an Object-Document-Mapper (ODM) for MongoDB written in Ruby. It was conceived in August, 2009 during a whiskey-induced evening at the infamous Oasis in Florida, USA by Durran Jordan. The philosophy of Mongoid is to provide a familiar API to Ruby developers who have been using Active Record or Data Mapper, while leveraging the power of MongoDB's schemaless and performant document-based design, dynamic queries, and atomic modifier operations. This is the site for Mongoid 3 documentation, along with Origin and Moped.

If you want the Mongoid 2 docs, please go here. class Artist include Mongoid::Document field :name, type: String embeds_many :instrumentsend class Instrument include Mongoid::Document field :name, type: String embedded_in :artistend syd = Artist.where(name: "Syd Vicious").between(age: 18..25).first syd.instruments.create(name: "Bass") syd.with(database: "bands", session: "backup").save! Code School - Rails for Zombies.