Create a gist now

Instantly share code, notes, and snippets.

Rails 3.1 Gemfile with DataMapper, RSpec, Haml, Sass, CoffeeScript and Thin (in dev)
# overwrite the existing requires at the top with these
require "action_controller/railtie"
require 'dm-rails/railtie'
require "action_mailer/railtie"
# require "active_resource/railtie"
require "sprockets/railtie"
source 'http://rubygems.org'
gem 'activesupport', :require => 'active_support'
gem 'actionpack', :require => 'action_pack'
gem 'actionmailer', :require => 'action_mailer'
gem 'railties', :require => 'rails'
gem 'mysql2'
DM_VERSION = '~> 1.2.0.rc1'
#gem 'dm-rails', "1.1.0" # git: "https://github.com/datamapper/dm-rails.git"
gem 'dm-active_model', DM_VERSION, git: "git://github.com/datamapper/dm-active_model.git"
gem 'dm-rails', DM_VERSION, git: "git://github.com/datamapper/dm-rails.git"
gem 'dm-mysql-adapter' , DM_VERSION
gem 'dm-migrations' , DM_VERSION
gem 'dm-types' , DM_VERSION, git: "git://github.com/datamapper/dm-types.git"
gem 'dm-validations' , DM_VERSION
#gem 'dm-constraints' , DM_VERSION
# gem 'dm-transactions' , DM_VERSION
gem 'dm-aggregates' , DM_VERSION
gem 'dm-timestamps' , DM_VERSION
gem 'dm-observer' , DM_VERSION
# gem 'dm-core'
gem 'tzinfo'
gem "haml"
gem "sass"
gem 'newrelic_rpm'
gem "voidtools", git: "git://github.com/makevoid/voidtools"
gem "exception_notification", :git => "git://github.com/rails/exception_notification"
gem 'jquery-rails'
gem 'capistrano'
group :development, :test do
gem "rspec-rails", "~> 2.6"
gem "jasmine", group: [:development, :test]
gem "spork"
end
group :test do
gem "factory_girl_rails"
gem "capybara"
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', " ~> 3.1.0"
gem 'coffee-rails', "~> 3.1.0"#, git: "git://github.com/rails/coffee-rails.git"
gem 'uglifier'
end
# web servers
# gem 'unicorn'
gem 'thin'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
#!/usr/bin/env ruby
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
APP_PATH = File.expand_path('../../config/application', __FILE__)
require File.expand_path('../../config/boot', __FILE__)
# override Rack::Handler#default to load thin:
# http://www.skorks.com/2011/08/when-developers-go-to-great-length-to-save-typing-4-letters/
require 'rack/handler'
Rack::Handler.class_eval do
def self.default(options = {})
# Guess.
if ENV.include?("PHP_FCGI_CHILDREN")
# We already speak FastCGI
options.delete :File
options.delete :Port
Rack::Handler::FastCGI
elsif ENV.include?("REQUEST_METHOD")
Rack::Handler::CGI
else
begin
Rack::Handler::Mongrel
rescue LoadError
begin
Rack::Handler::Thin
rescue LoadError
Rack::Handler::WEBrick
end
end
end
end
end
require 'rails/commands'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment