Skip to content

Instantly share code, notes, and snippets.

View rymai's full-sized avatar
🙌
Working from home

Rémy Coutable rymai

🙌
Working from home
View GitHub Profile
@rymai
rymai / gist:723780
Created December 1, 2010 16:49
Arel 2.0.5 LEFT OUTER JOIN bug
TableA
has_and_belongs_to_many :table_b
TableB
has_and_belongs_to_many :table_a
TableC is the join table of TableA and TableB
---------------------------------------
Arel 2.0.4 (Good query)
require File.join(File.dirname(__FILE__), 'boot')
Rails::Initializer.run do |config|
# Add additional load paths for your own custom dirs
config.load_paths += %W[#{Rails.root}/app/mailers]
# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
begin
require "rubygems"
require "bundler"
rescue LoadError
raise "Could not load the bundler gem. Install it with `gem install bundler`."
end
if Gem::Version.new(Bundler::VERSION) <= Gem::Version.new("0.9.24")
raise RuntimeError, "Your bundler version is too old." +
"Run `gem install bundler` to upgrade."
# Don't change this file!
# Configure your app in config/environment.rb and config/environments/*.rb
RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
module Rails
class << self
def boot!
unless booted?
preinitialize
→ bundle -v
Bundler version 0.9.25

→ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-darwin10.2.0]

→ rvm -v
rvm 0.1.37 by Wayne E. Seguin ([email protected]) [http://rvm.beginrescueend.com/]

passenger version: 2.2.13

1. Run: rails new_project
2. In Gemfile:
source 'http://rubygems.org'
gem 'rails', '3.0.0.beta3'
gem 'heroku'
gem 'i18n'
gem 'haml'