Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
puts "merb init called"

# $: << File.join(MERB_ROOT, "lib", "sequel", "lib")

Dir[MERB_ROOT+"/lib/*/lib/*.rb"].each               { |m| require m }
Dir[MERB_ROOT+"/lib/*/bin/*.rb"].each               { |m| require m }

require 'sequel/mysql'

# Need to connect to database before loading Sequel::Model classes
puts "Connecting to database..."
Sequel.mysql('marble', :host => 'localhost', :user => 'root', :logger => MERB_LOGGER)

require MERB_ROOT+"/app/controllers/application.rb"
Dir[MERB_ROOT+"/app/models/**/*.rb"].each           { |m| require m }
Dir[MERB_ROOT+"/app/controllers/**/*.rb"].each      { |m| require m }
Dir[MERB_ROOT+"/app/helpers/*.rb"].each             { |m| require m }
Dir[MERB_ROOT+"/app/mailers/*.rb"].each             { |m| require m }

Merb::Gems.load_required

# Get Environment File
require "#{MERB_ROOT}/config/environments/#{MERB_ENV}"

# 
# Add your own ruby code here for app specific stuff. This file gets loaded
# after the framework is loaded.