23 Mar '13, 10am

Sinatra partials:

To use ActiveRecord’s migrations with Sinatra (or other non-Rails project), add the following to your Rakefile: namespace :db do desc "Migrate the database" task(:migrate => :environment) do ActiveRecord::Base.logger = Logger.new(STDOUT) ActiveRecord::Migration.verbose = true ActiveRecord::Migrator.migrate("db/migrate") end end This assumes you have a task called :environment which loads your app’s environment (requires the right files, sets up the database connection, etc). Now you can create a directory called db/migrate and fill in your migrations. I usually call the first one 001_init.rb . (I prefer the old sequential method for numbering migrations vs. the datetime method used since Rails 2.1, but either will work.)

Full article: http://www.sinatrarb.com/faq.html#partials

Tweets

How to test Sinatra based Web Services

robots.thoughtbot.com 17 Mar '13, 1pm

March 17, 2013 hrward rspec webmock testing sinatra http rack-test service-oriented How to test Sinatra based Web Services...

Remember this?: Ten questions with Abbe Held of Kooba bags #AbbeHeld #Kooba

Remember this?: Ten questions with Abbe Held of...

handbagdujour.com 23 Mar '13, 6pm

Your are here: Home // Interviews ,Mixed Bag // Ten questions with Abbe Held of Kooba bags Ten questions with Abbe Held of...

Schoolchildren Asked To Celebrate Fossil Fuels ...

care2.com 23 Mar '13, 8pm

Since it's Sunday morning I'll pre-delete the expletives that are bouncing around in my head. Of all of the stories of the...

[ruby][gc] / “Frequently Asked Questions — Ruby...

rubyenterpriseedition.com 29 Mar '13, 4am

Ruby Enterprise Edition is a branch of Ruby, which includes: An enhanced garbage collector. This allows one to reduce memo...

Black Hat or White Hat SEO? It's Time to Ask Better Questions

Black Hat or White Hat SEO? It's Time to Ask Be...

seomoz.org 21 Mar '13, 10am

Since the Wild West days of the late 1990s, SEOs have been grouped into two camps – the “black hats” and the “white hats”....

#WoundedWarrior Screened at Phoenix Was Not Ask...

blog.tsa.gov 20 Mar '13, 10pm

After reviewing TSA video (CCTV), interviewing and receiving written statements from all Officers involved, we found that ...

CoffeeGeek - Espresso: Questions and Answers, I...

coffeegeek.com 24 Mar '13, 5am

There are quite a few, for instance check out: http://www.coffeekrave.com/benefits-of-coffee/ But the exact benefits of co...