Hi - I’m trying to see how my app behaves in production environment by
running the development server with -e production:
appdir~$ ./script/server -p production
=> Booting Mongrel
=> Rails 2.3.2 application starting on http://0.0.0.0:3000
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:1964:in
method_missing': undefined method
validates_positivity_of’ for
#Class:0xb6d8cb40 (NoMethodError)
from /home/gtman/work/rails/bar/app/models/commission.rb:7
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
require’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:158:in
require' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:265:in
require_or_load’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:224:in
depend_on' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:136:in
require_dependency’
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:393:in
load_application_classes' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:392:in
each’
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:392:in
load_application_classes' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:390:in
each’
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:390:in
load_application_classes' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:195:in
process’
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:113:in
send' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:113:in
run’
from /home/gtman/work/rails/bar/config/environment.rb:14
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
require’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in
require' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in
new_constants_in’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in
require' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/commands/server.rb:84 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require’
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
require' from ./script/server:3 from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:392:in
load_application_classes’
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:390:in
each' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:390:in
load_application_classes’
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:195:in
process' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:113:in
send’
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:113:in
run' from /home/shilo/work/rails/bar/config/environment.rb:14 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require’
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
require' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in
require’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in
new_constants_in' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in
require’
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/commands/server.rb:84
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
require’
from ./script/server:3
my validations are in a file inside lib folder: http://pastie.org/463883
Not so sure what I’m doing wrong, since all of that worked great while
in development mode. I’d appreciate any help offered - thanks.