-
-
Save cloudbring/b715aad9fe629a2d58b1 to your computer and use it in GitHub Desktop.
ActiveRecord not loading in Sinatra
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Defines our constants | |
PADRINO_ENV = ENV["PADRINO_ENV"] ||= ENV["RACK_ENV"] ||= "development" unless defined?(PADRINO_ENV) | |
PADRINO_ROOT = File.expand_path('../..', __FILE__) unless defined?(PADRINO_ROOT) | |
# Load our dependencies | |
require 'rubygems' unless defined?(Gem) | |
require 'bundler/setup' | |
Bundler.require(:default, PADRINO_ENV) | |
## | |
# Enable devel logging | |
# | |
# Padrino::Logger::Config[:development] = { :log_level => :devel, :stream => :stdout } | |
# Padrino::Logger.log_static = true | |
# | |
## | |
# Add your before load hooks here | |
# | |
Padrino.before_load do | |
end | |
## | |
# Add your after load hooks here | |
# | |
Padrino.after_load do | |
end | |
Padrino.load! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=> Problem loading ./config/boot.rb | |
=> uninitialized constant Object::ActiveRecord | |
/Users/e/.rvm/gems/ruby-1.9.2-p290@tyrone/gems/rake-0.9.2/lib/rake/ext/module.rb:36:in `const_missing' | |
/Users/e/work/sg/tyrone/models/pull.rb:1:in `<top (required)>' | |
/Users/e/.rvm/gems/ruby-1.9.2-p290@tyrone/gems/padrino-core-0.10.2/lib/padrino-core/reloader.rb:142:in `require' | |
/Users/e/.rvm/gems/ruby-1.9.2-p290@tyrone/gems/padrino-core-0.10.2/lib/padrino-core/reloader.rb:142:in `safe_load' | |
/Users/e/.rvm/gems/ruby-1.9.2-p290@tyrone/gems/padrino-core-0.10.2/lib/padrino-core/loader.rb:140:in `block in require_dependencies' | |
/Users/e/.rvm/gems/ruby-1.9.2-p290@tyrone/gems/padrino-core-0.10.2/lib/padrino-core/loader.rb:138:in `each' | |
/Users/e/.rvm/gems/ruby-1.9.2-p290@tyrone/gems/padrino-core-0.10.2/lib/padrino-core/loader.rb:138:in `require_dependencies' | |
/Users/e/.rvm/gems/ruby-1.9.2-p290@tyrone/gems/padrino-core-0.10.2/lib/padrino-core/loader.rb:56:in `block in load!' | |
/Users/e/.rvm/gems/ruby-1.9.2-p290@tyrone/gems/padrino-core-0.10.2/lib/padrino-core/loader.rb:56:in `each' | |
/Users/e/.rvm/gems/ruby-1.9.2-p290@tyrone/gems/padrino-core-0.10.2/lib/padrino-core/loader.rb:56:in `load!' | |
/Users/e/work/sg/tyrone/config/boot.rb:29:in `<top (required)>' | |
/Users/e/.rvm/gems/ruby-1.9.2-p290@tyrone/gems/padrino-gen-0.10.2/lib/padrino-gen/generators/cli.rb:24:in `require' | |
/Users/e/.rvm/gems/ruby-1.9.2-p290@tyrone/gems/padrino-gen-0.10.2/lib/padrino-gen/generators/cli.rb:24:in `load_boot' | |
/Users/e/.rvm/gems/ruby-1.9.2-p290@tyrone/gems/thor-0.14.6/lib/thor/task.rb:22:in `run' | |
/Users/e/.rvm/gems/ruby-1.9.2-p290@tyrone/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task' | |
/Users/e/.rvm/gems/ruby-1.9.2-p290@tyrone/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `block in invoke_all' | |
/Users/e/.rvm/gems/ruby-1.9.2-p290@tyrone/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `each' | |
/Users/e/.rvm/gems/ruby-1.9.2-p290@tyrone/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `map' | |
/Users/e/.rvm/gems/ruby-1.9.2-p290@tyrone/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `invoke_all' | |
/Users/e/.rvm/gems/ruby-1.9.2-p290@tyrone/gems/thor-0.14.6/lib/thor/group.rb:226:in `dispatch' | |
/Users/e/.rvm/gems/ruby-1.9.2-p290@tyrone/gems/thor-0.14.6/lib/thor/base.rb:389:in `start' | |
/Users/e/.rvm/gems/ruby-1.9.2-p290@tyrone/gems/padrino-gen-0.10.2/bin/padrino-gen:16:in `<main>' | |
apply orms/activerecord | |
apply tests/cucumber | |
apply tests/rspec | |
identical models/pull.rb | |
identical spec/models/pull_spec.rb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment